From 3d6a8dfdacdc8d92b9d8517c0a054d6c4a651a61 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 15 Apr 2024 12:33:35 +0900 Subject: [PATCH] Update backup scripts --- nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh | 2 +- nixos/hosts/backups-rpi4/scripts/rsync-media.sh | 2 +- nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh b/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh index 3a05daa3..7a81e955 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh @@ -30,7 +30,7 @@ fi # If an old backup is still running, don't continue if [[ `ps aux | grep rsync | grep -v grep | grep -v $BACKUP_NAME` ]] ; then echo -e "$BACKUP_NAME rsync still running. Exiting...." - payload="{\"message\": \"$BACKUP_NAME stopped. rsync-sysctl is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}" + payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME 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 diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-media.sh b/nixos/hosts/backups-rpi4/scripts/rsync-media.sh index 99e758d2..556882b6 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-media.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-media.sh @@ -30,7 +30,7 @@ fi # If an old backup is still running, don't continue if [[ `ps aux | grep rsync | grep -v grep | grep -v $BACKUP_NAME` ]] ; then echo -e "$BACKUP_NAME rsync still running. Exiting...." - payload="{\"message\": \"$BACKUP_NAME stopped. rsync-sysctl is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}" + payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME 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 diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh index 483e8a89..18e132af 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh @@ -29,7 +29,7 @@ fi # If an old backup is still running, don't continue if [[ `ps aux | grep rsync | grep -v grep | grep -v rsync-sysctl` ]] ; then echo -e "$BACKUP_NAME rsync still running. Exiting...." - payload="{\"message\": \"$BACKUP_NAME stopped. rsync-sysctl is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}" + payload="{\"message\": \"$BACKUP_NAME stopped. $BACKUP_NAME is still running.\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME 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