From f53ca78f6d3ae3d1bdd8d25bee9e0234100c9c05 Mon Sep 17 00:00:00 2001 From: Dunestorm Date: Sun, 15 May 2022 21:53:30 +0100 Subject: [PATCH] [Proxmox Timed Shutdown] --- ProxmoxTimedShutdown.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ProxmoxTimedShutdown.sh diff --git a/ProxmoxTimedShutdown.sh b/ProxmoxTimedShutdown.sh new file mode 100644 index 0000000..c497fdc --- /dev/null +++ b/ProxmoxTimedShutdown.sh @@ -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 \ No newline at end of file