Ansible_workstation/files/choux_borg.service

13 lines
402 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Borg Backup
[Service]
Type=simple
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
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'