Ansible_workstation/files/dd_borg/automatic-backup.service

8 lines
293 B
SYSTEMD
Raw Normal View History

[Service]
Type=oneshot
2020-02-23 04:43:28 +00:00
ExecStartPre=notify-send "Backup starts"
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 failed." -u critical'