Re: How can a program know whether it is running in superuser mode?
- Posted by rkdavis Jan 15, 2010
- 961 views
sorry forgot to give an example
if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" 1>&2 exit 1 fi
sorry forgot to give an example
if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" 1>&2 exit 1 fi