root user check posix compliance

This commit is contained in:
pryme-svg 2021-04-25 11:44:23 -07:00
parent c288113a2d
commit 28f36377a4
No known key found for this signature in database
GPG Key ID: FC2C27C43C849EBE
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ if [ "$TERM" = dumb ]; then
exit
fi
if [ "$(whoami)" = "root" ]; then
if [ $(id -u) -eq 0 ]; then
Error "Don't run this script as root"
exit
fi