This pull request adds support for triggering webhooks from the post-backup.sh hook using curl.
Instead of adding support for a specific platform (Teams, Slack, etc.) using environment variables, this just makes it possible to call curl from the post-backup.sh hook. Most likely users will want to control the formatting of messages which requires platform specific code. The hook also gets a parameter (return code of the restic backup command) so the user can decide if they want notifications always or only on failure.
Also removed the exit 1 when backup fails since it prevented notifications on backup failure. If a backup fails, we especially want to be notified about it.
This pull request adds support for triggering webhooks from the
post-backup.sh
hook using curl.Instead of adding support for a specific platform (Teams, Slack, etc.) using environment variables, this just makes it possible to call curl from the
post-backup.sh
hook. Most likely users will want to control the formatting of messages which requires platform specific code. The hook also gets a parameter (return code of the restic backup command) so the user can decide if they want notifications always or only on failure.Also removed the
exit 1
when backup fails since it prevented notifications on backup failure. If a backup fails, we especially want to be notified about it.