Ansible_workstation/files/choux_borg.service

13 lines
402 B
Desktop File

[Unit]
Description=Borg Backup
[Service]
Type=simple
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
ExecStartPre=/usr/bin/borg break-lock {{ borg_backup_repo }}
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'