Update script and timezones on pi's
This commit is contained in:
parent
477b5b0f10
commit
33baa5ce70
3 changed files with 9 additions and 3 deletions
|
@ -7,7 +7,7 @@ let
|
||||||
|
|
||||||
GOTIFY_TOKEN=`cat /var/run/secrets/gotify_token | head -n 1`
|
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\"}"
|
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'}`
|
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'}`
|
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)
|
check=$(ssh root@nuc-docker01 df -h | grep Storage | wc -l)
|
||||||
if [[ $check != 3 ]] ; then
|
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\"}"
|
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
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ echo -e "======= Time complete: `date`"
|
||||||
|
|
||||||
echo "Sending completion message"
|
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\"}"
|
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
|
in
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
libraspberrypi
|
libraspberrypi
|
||||||
raspberrypi-eeprom
|
raspberrypi-eeprom
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Asia/Tokyo";
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# BEGIN hardware config
|
# BEGIN hardware config
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
raspberrypi-eeprom
|
raspberrypi-eeprom
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Asia/Tokyo";
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# BEGIN hardware config
|
# BEGIN hardware config
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
Loading…
Reference in a new issue