From e3de4ded7a877ea93768e3a701287be88aeb4a33 Mon Sep 17 00:00:00 2001 From: Thomas de Roo Date: Wed, 30 Aug 2023 08:50:33 +0200 Subject: [PATCH] Update rebootSchedule.sh --- rebootSchedule.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rebootSchedule.sh b/rebootSchedule.sh index 465c876..5c27464 100644 --- a/rebootSchedule.sh +++ b/rebootSchedule.sh @@ -11,6 +11,8 @@ REST=("dt03" "git01" "run01" "has01" "iam01" "man01" "mdm01" "minecraft" "nms01" # 1:00h (uit crontab) FIRST # ############################################ for SERVER in ${FIRST[@]}; do + echo "------------------------------------" + date +"%H:%M:%S %d-%m-%Y" echo Starting reboot of $SERVER ssh $SERVER reboot now sleep 60 @@ -26,6 +28,8 @@ echo Waiting $timeToWait seconds sleep $timeToWait for SERVER in ${SECOND[@]}; do + echo "------------------------------------" + date +"%H:%M:%S %d-%m-%Y" echo Starting reboot of $SERVER ssh $SERVER reboot now sleep 60 @@ -41,6 +45,8 @@ echo Waiting $timeToWait seconds sleep $timeToWait for SERVER in ${THIRD[@]}; do + echo "------------------------------------" + date +"%H:%M:%S %d-%m-%Y" echo Starting reboot of $SERVER ssh $SERVER reboot now done @@ -55,6 +61,8 @@ echo Waiting $timeToWait seconds sleep $timeToWait for SERVER in ${REST[@]}; do + echo "------------------------------------" + date +"%H:%M:%S %d-%m-%Y" echo Starting reboot of $SERVER ssh $SERVER reboot now done @@ -67,6 +75,6 @@ targetTime=$(date -d 01:55 +%s) timeToWait=$(($targetTime - $timeNow)) echo Waiting $timeToWait seconds sleep $timeToWait - +echo "------------------------------------" echo Starting reboot of $(hostname) shutdown -r 5 "Reboot in 5 minutes."