mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2025-12-16 03:34:18 +01:00
Added Gotify notification
This commit is contained in:
@@ -94,7 +94,12 @@ done
|
|||||||
|
|
||||||
# Send a notification to Slack
|
# Send a notification to Slack
|
||||||
if [[ "$SLACK_URL" != "" ]] ; then
|
if [[ "$SLACK_URL" != "" ]] ; then
|
||||||
curl -s -X POST --data-urlencode "payload={\"username\": \"rpi-docker-backup\", \"icon_emoji\": \":dvd:\", \"text\": \"Backup finished on host $HOSTNAME : $count_success succeeded, $count_failure failed\"}" $SLACK_URL
|
curl -o /dev/null -s -m 10 --retry 5 -X POST --data-urlencode "payload={\"username\": \"rpi-docker-backup\", \"icon_emoji\": \":dvd:\", \"text\": \"Backup finished on host $HOSTNAME : $count_success succeeded, $count_failure failed\"}" $SLACK_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Send a notification to Gotify
|
||||||
|
if [[ "$GOTIFY_URL" != "" ]] ; then
|
||||||
|
curl -o /dev/null -s -m 10 --retry 5 -X POST -H "accept: application/json" -H "Content-Type: application/json" -d "{\"priority\": 5, \"title\": \"Backup finished on host $HOSTNAME\", \"message\": \"Backup finished on host $HOSTNAME : $count_success succeeded, $count_failure failed\"}" $GOTIFY_URL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Return a non zero exit code if an error happened
|
# Return a non zero exit code if an error happened
|
||||||
|
|||||||
Reference in New Issue
Block a user