#!/bin/sh ntfy() { sh /opt/scripts/ntfy.sh -s "/etc/ixvd/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" } ntfy -m "performing backup..." if restic \ -r "/mnt/backups/restic/$(hostname)" \ -p "/etc/ixvd/secrets/restic/$(hostname).secret" \ backup \ --tag auto \ /srv /home /etc; then ntfy -m "backup succeeded" else ntfy -m "backup failed" -e "warning,skull" fi