Ansible_workstation/files/choux_borg.service

14 lines
444 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Borg Backup
[Service]
2020-07-17 09:39:35 +00:00
Type=oneshot
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
2020-02-23 04:43:28 +00:00
ExecStartPre=notify-send "Backup starts"
ExecStartPre=/usr/bin/borg break-lock {{ borg_backup_repo }}
2018-11-10 16:29:41 +00:00
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'