Created
September 11, 2019 22:51
-
-
Save SofianeHamlaoui/0988b9a5296d8b1653ffcdde843c88e0 to your computer and use it in GitHub Desktop.
Check for Root permissions on bash
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
function checkroot { | |
showlogo && sleep 1 | |
if [[ $(id -u) = 0 ]]; then | |
echo -e " Checking For ROOT: ${g}PASSED${endc}" | |
else | |
echo -e " Checking For ROOT: ${r}FAILED${endc} | |
${y}This Script Needs To Run As ROOT${endc}" | |
echo -e " ${b}Lockdoor Installer${enda} Will Now Exit" | |
echo | |
sleep 1 | |
exit | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment