update backup script

This commit is contained in:
albert 2024-03-08 09:22:58 +09:00
parent 08872ef6b2
commit ade27333bd
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A

View file

@ -29,7 +29,7 @@ echo "$drive3 / $mount3 / $mounted3"
if [[ $mounted1 != 0 ]] || [[ mounted2 != 0 ]] || [[ $mounted3 != 0 ]] ; then if [[ $mounted1 != 0 ]] || [[ mounted2 != 0 ]] || [[ $mounted3 != 0 ]] ; then
payload="{\"message\": \"Backup stopped. One or more local drives are not mounted.\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: Backup Stopped\"}" payload="{\"message\": \"Backup stopped. One or more local drives are not mounted.\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: Backup Stopped\"}"
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
exit
fi fi
echo "Drive 1: $drive1" echo "Drive 1: $drive1"
@ -159,7 +159,7 @@ echo "$drive3 / $mount3 / $mounted3"
if [[ $mounted1 != 0 ]] || [[ mounted2 != 0 ]] || [[ $mounted3 != 0 ]] ; then if [[ $mounted1 != 0 ]] || [[ mounted2 != 0 ]] || [[ $mounted3 != 0 ]] ; then
payload="{\"message\": \"Data Vol Backup stopped. One or more local drives are not mounted.\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: Data Vol Backup Stopped\"}" payload="{\"message\": \"Data Vol Backup stopped. One or more local drives are not mounted.\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: Data Vol Backup Stopped\"}"
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
exit
fi fi
echo "Drive 1: $drive1" echo "Drive 1: $drive1"