Feat: Add stoppost notify to backup sevices

This commit is contained in:
2020-02-23 05:41:35 +01:00
parent 9e0db7bfb4
commit 01c68dd908
2 changed files with 4 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
[Service]
Type=oneshot
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'