[Proxmox Timed Shutdown]

- Ammended timings
This commit is contained in:
2022-05-16 00:55:30 +01:00
parent f53ca78f6d
commit 0bece429b6
+2 -2
View File
@@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
CURRENT_TIME=$(date +%H:%M) CURRENT_TIME=$(date +%H:%M)
if [[ $CURRENT_TIME < "00:00" ]] || [[ $CURRENT_TIME > "23:45" ]]; then if [[ $CURRENT_TIME > "00:00" ]] && [[ $CURRENT_TIME < "8:30" ]]; then
echo "Triggering scheduled post-backup shutdown" echo "Triggering scheduled post-backup shutdown"
shutdown -h now shutdown -P 01:00
else else
echo "Automatic shutdown not triggered due to current time" echo "Automatic shutdown not triggered due to current time"
fi fi