From cd9973fdc1277fe324388477809b2e9c0393ad4c Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 4 Mar 2024 11:08:01 +0900 Subject: [PATCH] Update backup scripts --- nixos/hosts/backups-rpi4/backup-script.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/backups-rpi4/backup-script.nix b/nixos/hosts/backups-rpi4/backup-script.nix index 846dac4f..31d77e62 100644 --- a/nixos/hosts/backups-rpi4/backup-script.nix +++ b/nixos/hosts/backups-rpi4/backup-script.nix @@ -26,7 +26,7 @@ echo "$drive2 / $mount2 / $mounted2" echo "$drive3 / $mount3 / $mounted3" # If any drive isn't found, exit: -if [[ $mounted1 != 0 ]] || [[ munted2 != 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\"}" 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" @@ -156,7 +156,7 @@ echo "$drive2 / $mount2 / $mounted2" echo "$drive3 / $mount3 / $mounted3" # If any drive isn't found, exit: -if [[ $mounted1 != 0 ]] || [[ munted2 != 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\"}" 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" @@ -222,7 +222,7 @@ echo "$drive2 / $mount2 / $mounted2" echo "$drive3 / $mount3 / $mounted3" # If any drive isn't found, exit: -if [[ $mounted1 != 0 ]] && [[ munted2 != 0 ]] && [[ $mounted3 != 0 ]] ; then +if [[ $mounted1 != 0 ]] && [[ mounted2 != 0 ]] && [[ $mounted3 != 0 ]] ; then payload="{\"message\": \"sysctl.io Backup stopped. One or more local drives are not mounted.\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: sysctl.io 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"