Update script and timezones on pi's

This commit is contained in:
iFargle 2023-12-15 21:38:01 +09:00
parent 477b5b0f10
commit 33baa5ce70
3 changed files with 9 additions and 3 deletions

View file

@ -7,7 +7,7 @@ let
GOTIFY_TOKEN=`cat /var/run/secrets/gotify_token | head -n 1`
payload="{\"message\": \"Backup has started\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: Backup Started\"}"
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"
drive1=`lsblk -o NAME,SERIAL | grep -v crypt | grep 9RGHYP8C | awk {'print $1'}`
drive2=`lsblk -o NAME,SERIAL | grep -v crypt | grep 9RGXW93C | awk {'print $1'}`
@ -21,7 +21,7 @@ echo "Checking if the NAS is mounted on nuc-docker01:"
check=$(ssh root@nuc-docker01 df -h | grep Storage | wc -l)
if [[ $check != 3 ]] ; then
payload="{\"message\": \"Backup stopped. nuc-docker01 does not have 3 mounts in Storage\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
@ -108,7 +108,7 @@ echo -e "======= Time complete: `date`"
echo "Sending completion message"
payload="{\"message\": \"Backup completed\nDate: `date`\n`df -h | grep sda`\n`df -h | grep sdb`\n`df -h | grep sdc`\", \"priority\": 2,\"title\": \"backups-rpi4: Backup Complete\"}"
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"
'';
in

View file

@ -23,6 +23,9 @@
libraspberrypi
raspberrypi-eeprom
];
# Set your time zone.
time.timeZone = "Asia/Tokyo";
#####################################################################################
# BEGIN hardware config

View file

@ -23,6 +23,9 @@
raspberrypi-eeprom
];
# Set your time zone.
time.timeZone = "Asia/Tokyo";
#####################################################################################
# BEGIN hardware config
#####################################################################################