Skip to content

Commit

Permalink
move configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeguzis committed Nov 17, 2024
1 parent a783985 commit 7e9a5ba
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
5 changes: 5 additions & 0 deletions cfgs/systemd/ludusavi-backup.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Unit]
Description="Ludusavi backup"

[Service]
ExecStart=/opt/ludusavi backup --force
9 changes: 9 additions & 0 deletions cfgs/systemd/ludusavi-backup.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description="Ludusavi backup timer"

[Timer]
OnCalendar=*/30 * * * *
Unit=ludusavi-backup.service

[Install]
WantedBy=timers.target
3 changes: 3 additions & 0 deletions utilities/update-software/install-update-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ CONFIG_ROOT="${HOME}/.config/steamos-tools"
# Config dirs
mkdir -p "${CONFIG_ROOT}"
mkdir -p "${CONFIG_ROOT}/ludusavi"
mkdir -p "${CONFIG_ROOT}/systemd"

# Copy
cp -v "${GIT_ROOT}/cfgs/ludusavi/config.yaml" "${CONFIG_ROOT}/ludusavi/"
cp -v "${GIT_ROOT}/cfgs/systemd/ludusavi-backup.service" "${CONFIG_ROOT}/systemd/"
cp -v "${GIT_ROOT}/cfgs/systemd/ludusavi-backup.timer" "${CONFIG_ROOT}/systemd/"
cp -v "${GIT_ROOT}/cfgs/desktop-files/update-software.desktop" "${HOME}/Desktop"
cp -v "${GIT_ROOT}/cfgs/desktop-files/update-software.desktop" "${HOME}/.local/share/applications"
cp -v "${GIT_ROOT}/utilities/update-software/update-software.sh" "${HOME}/.local/bin"
Expand Down
26 changes: 2 additions & 24 deletions utilities/update-software/update-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,33 +305,11 @@ update_core_software() {
# ludusavi
# https://github.com/mtkennerly/ludusavi/blob/master/docs/help/backup-automation.md
echo -e "\n[INFO] Installing systemd user service for ludusavi (backups)"
cat > "${HOME}/.config/systemd/user/ludusavi-backup.service" <<EOF
[Unit]
Description="Ludusavi backup"
[Service]
Environment="RUST_LOG=ludusavi=debug"
ExecStart=flatpak run com.github.mtkennerly.ludusavi backup --force
EOF
cat > "${HOME}/.config/systemd/user/ludusavi-backup.timer" <<EOF
[Unit]
Description="Ludusavi backup timer"
[Timer]
OnCalendar=*-*-* *:00/5:00
Unit=ludusavi-backup.service
[Install]
WantedBy=timers.target
EOF
cp -v "${CONFIG_ROOT}/systemd/ludusavi-backup.service" "${HOME}/.config/systemd/user/ludusavi-backup.service"
cp -v "${CONFIG_ROOT}/systemd/ludusavi-backup.timer" "${HOME}/.config/systemd/user/ludusavi-backup.timer"
systemctl --user enable ludusavi-backup.timer
systemctl --user start ludusavi-backup.timer

echo -e "\n[INFO] Updating core software\n"
sleep 2


}

update_emulator_software() {
Expand Down

0 comments on commit 7e9a5ba

Please sign in to comment.