Feat: Add StartPre backup notify
This commit is contained in:
@@ -6,6 +6,7 @@ Type=simple
|
|||||||
Nice=19
|
Nice=19
|
||||||
IOSchedulingClass=2
|
IOSchedulingClass=2
|
||||||
IOSchedulingPriority=7
|
IOSchedulingPriority=7
|
||||||
|
ExecStartPre=notify-send "Backup starts"
|
||||||
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 finished"'
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
ExecStartPre=notify-send "Backup starts"
|
||||||
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 finished: Drive can be removed."'
|
||||||
ExecStopPost=-bash -c '[[ $EXIT_STATUS != 0 ]] && notify-send "Backup failed." -u critical'
|
ExecStopPost=-bash -c '[[ $EXIT_STATUS != 0 ]] && notify-send "Backup failed." -u critical'
|
||||||
|
Reference in New Issue
Block a user