From 7582456e39fafc0eda600327689f7aa40ed0656d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 30 Jun 2024 02:48:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(systemd):=20backu?= =?UTF-8?q?pGamesaves=20is=20now=20an=20external=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/systemd/user/backupGames.service | 2 +- .local/bin/backupGamesaves | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 .local/bin/backupGamesaves diff --git a/.config/systemd/user/backupGames.service b/.config/systemd/user/backupGames.service index 552751d8..2d58bb34 100644 --- a/.config/systemd/user/backupGames.service +++ b/.config/systemd/user/backupGames.service @@ -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 diff --git a/.local/bin/backupGamesaves b/.local/bin/backupGamesaves new file mode 100755 index 00000000..7f83019e --- /dev/null +++ b/.local/bin/backupGamesaves @@ -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"