Feat: Add stoppost notify to backup sevices
This commit is contained in:
parent
9e0db7bfb4
commit
01c68dd908
@ -8,3 +8,5 @@ IOSchedulingClass=2
|
|||||||
IOSchedulingPriority=7
|
IOSchedulingPriority=7
|
||||||
ExecStartPre=/usr/bin/borg break-lock {{ borg_backup_repo }}
|
ExecStartPre=/usr/bin/borg break-lock {{ borg_backup_repo }}
|
||||||
ExecStart={{ borg_script_path }}/{{ borg_script_filename }}
|
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'
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/etc/backups/run.sh
|
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'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user