From ade27333bdf4f4f49632d0c007c0931d0f0e5710 Mon Sep 17 00:00:00 2001 From: albert Date: Fri, 8 Mar 2024 09:22:58 +0900 Subject: [PATCH] update backup script --- nixos/hosts/backups-rpi4/backup-script.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/hosts/backups-rpi4/backup-script.nix b/nixos/hosts/backups-rpi4/backup-script.nix index 31d77e62..26522b7e 100644 --- a/nixos/hosts/backups-rpi4/backup-script.nix +++ b/nixos/hosts/backups-rpi4/backup-script.nix @@ -29,7 +29,7 @@ echo "$drive3 / $mount3 / $mounted3" 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\"}" 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 echo "Drive 1: $drive1" @@ -159,7 +159,7 @@ echo "$drive3 / $mount3 / $mounted3" 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\"}" 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 echo "Drive 1: $drive1"