[Proxmox Timed Shutdown]

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