From 12d94ee485a75ca428ccc1cf26a411383b063f45 Mon Sep 17 00:00:00 2001 From: RealJohnGalt Date: Mon, 7 Jan 2019 13:34:34 -0800 Subject: [PATCH] do not run as root --- cemutil.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cemutil.sh b/cemutil.sh index fe57398..dbecab2 100755 --- a/cemutil.sh +++ b/cemutil.sh @@ -1,8 +1,13 @@ #!/bin/bash +if (( $EUID == 0 )); then + echo "Do not run as root." + exit 1 +fi + if [ -z "$DISPLAY" ]; then export DISPLAY=:0.0 -fi +fi # help function: function printhelp {