diff --git a/files/choux_borg.service b/files/choux_borg.service index af854ec..533b5d8 100644 --- a/files/choux_borg.service +++ b/files/choux_borg.service @@ -8,3 +8,5 @@ IOSchedulingClass=2 IOSchedulingPriority=7 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"' +ExecStopPost=-bash -c '[[ $EXIT_STATUS != 0 ]] && notify-send "Backup failed." -u critical' diff --git a/files/dd_borg/automatic-backup.service b/files/dd_borg/automatic-backup.service index c0209d2..4a58e59 100644 --- a/files/dd_borg/automatic-backup.service +++ b/files/dd_borg/automatic-backup.service @@ -1,4 +1,6 @@ [Service] Type=oneshot 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'