u
This commit is contained in:
@@ -24,7 +24,9 @@ home_dir=/usr/local/bin
|
|||||||
this_file=curae.sh
|
this_file=curae.sh
|
||||||
|
|
||||||
|
|
||||||
if [ "$EUID" -ne 0 ]
|
# https://stackoverflow.com/questions/18215973/how-to-check-if-running-as-root-in-a-bash-script
|
||||||
|
#if [ "$EUID" -ne 0 ]
|
||||||
|
if [ $(id -u) -ne 0 ]
|
||||||
then echo "error: run as 'root'"
|
then echo "error: run as 'root'"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user