2018-10-08 08:28:02 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Borg Backup
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
Nice=19
|
|
|
|
IOSchedulingClass=2
|
|
|
|
IOSchedulingPriority=7
|
2020-02-23 04:43:28 +00:00
|
|
|
ExecStartPre=notify-send "Backup starts"
|
2018-10-08 08:28:02 +00:00
|
|
|
ExecStartPre=/usr/bin/borg break-lock {{ borg_backup_repo }}
|
2018-11-10 16:29:41 +00:00
|
|
|
ExecStart={{ borg_script_path }}/{{ borg_script_filename }}
|
2020-02-23 04:41:35 +00:00
|
|
|
ExecStopPost=-bash -c '[[ $EXIT_STATUS == 0 ]] && notify-send "Backup finished"'
|
|
|
|
ExecStopPost=-bash -c '[[ $EXIT_STATUS != 0 ]] && notify-send "Backup failed." -u critical'
|