Created
July 3, 2021 03:38
-
-
Save mikepsinn/874e3eacaeaed60a5a3167e76f104bb8 to your computer and use it in GitHub Desktop.
die if root
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
#!/bin/bash | |
if [[ $EUID -eq 0 ]]; then | |
echo | |
echo "================ Error =================" | |
echo "Do not run this as the root user" | |
echo "========================================" | |
echo | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment