From dc0b6e139b27686e13ae59fe374d452a7f6acc05 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 23 Feb 2020 05:43:28 +0100 Subject: [PATCH] Feat: Add StartPre backup notify --- files/choux_borg.service | 1 + files/dd_borg/automatic-backup.service | 1 + 2 files changed, 2 insertions(+) diff --git a/files/choux_borg.service b/files/choux_borg.service index 533b5d8..e932246 100644 --- a/files/choux_borg.service +++ b/files/choux_borg.service @@ -6,6 +6,7 @@ Type=simple Nice=19 IOSchedulingClass=2 IOSchedulingPriority=7 +ExecStartPre=notify-send "Backup starts" ExecStartPre=/usr/bin/borg break-lock {{ borg_backup_repo }} ExecStart={{ borg_script_path }}/{{ borg_script_filename }} ExecStopPost=-bash -c '[[ $EXIT_STATUS == 0 ]] && notify-send "Backup finished"' diff --git a/files/dd_borg/automatic-backup.service b/files/dd_borg/automatic-backup.service index 4a58e59..2692112 100644 --- a/files/dd_borg/automatic-backup.service +++ b/files/dd_borg/automatic-backup.service @@ -1,5 +1,6 @@ [Service] Type=oneshot +ExecStartPre=notify-send "Backup starts" ExecStart=/etc/backups/run.sh ExecStopPost=-bash -c '[[ $EXIT_STATUS == 0 ]] && notify-send "Backup finished: Drive can be removed."' ExecStopPost=-bash -c '[[ $EXIT_STATUS != 0 ]] && notify-send "Backup failed." -u critical'