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."