Last active
March 12, 2020 15:46
-
-
Save jcefoli/0eb8f54b4307ecf0c0620141bf5c9b48 to your computer and use it in GitHub Desktop.
Check for Root
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
#!/usr/bin/env bash | |
if [ "$(whoami)" != "root" ]; then | |
echo -e "Sorry, you are not running as root.\nPlease run this script as root.\n\nExiting..."; | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment