Created
February 27, 2015 03:32
-
-
Save stoph/6f047380125539f991f6 to your computer and use it in GitHub Desktop.
Simple script to quickly reboot your Raspberry Pi
This file contains 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
# Reboot script | |
# mine lives in /usr/local/bin/rb | |
# be sure to 'sudo chmod +x /usr/local/bin/rb' | |
#!/bin/bash | |
read -r -p "Are you sure you want to reboot? [y/N] " response | |
response=${response,,} | |
if [[ $response =~ ^(yes|y)$ ]] | |
then | |
sudo shutdown -r now | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment