Last active
February 4, 2019 15:02
-
-
Save blackknight36/f92ad4ddbba3a3b7d961e6aa629c7499 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script generates a command which can be used to reboot a server at a random time between 3:00 AM and 6:59 AM. | |
hour=`printf "%02d" $(shuf -i 3-6 -n 1)` | |
minute=`printf "%02d" $(shuf -i 00-59 -n 1)` | |
reboot_time="$hour:$minute" | |
echo "shutdown -r $reboot_time" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment