This does not cover the case where a user logs in and then changes to root sudo su
|
if [[ ! ${USER} =~ .*root* ]] |
|
then |
|
echo "Script must be run as root: exiting" |
|
exit 1 |
|
fi |
|
if [[ ! ${USER} =~ .*root.* ]] |
|
then |
|
echo "Script must be run as root: exiting" |
|
exit 1 |
|
fi |
This does not cover the case where a user logs in and then changes to root
sudo suhue_scripts/hue_download_watcher.sh
Lines 76 to 80 in f960d0e
hue_scripts/hue_restart_cm.sh
Lines 98 to 102 in bf20b17