♻️ refactor(systemd): backupGamesaves is now an external script

This commit is contained in:
Sergio Laín 2024-06-30 02:48:08 +02:00
parent 70ed8a86ec
commit 7582456e39
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150
2 changed files with 17 additions and 1 deletions

View file

@ -4,7 +4,7 @@ After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/ludusavi backup --force --full-limit 3 && notify-send "Gamesaves Backup Complete" -i ~/.local/share/icons/Catppuccin-SE/64x64@2x/apps/org.gnome.games.svg --app-name=Ludusavi
ExecStart=/home/matt/.local/bin/backupGamesaves
[Install]
WantedBy=default.target

16
.local/bin/backupGamesaves Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
notify() {
notify-send "$1" -i ~/.local/share/icons/Catppuccin-SE/64x64@2x/apps/org.gnome.games.svg --app-name=Ludusavi
}
if ! command -v ludusavi &>/dev/null; then
notify "Error: ludusavi is not installed"
exit 1
fi
notify "Started Backup..."
ludusavi backup --force --full-limit 3
notify "Backup Complete"