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