From d1e66443a4f1e4fff92fb1cff383daadc3bfea1b Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Fri, 9 Aug 2019 00:45:51 -0500 Subject: [PATCH] Check for superuser permissions in order to run script. --- jigasi.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jigasi.sh b/jigasi.sh index d8f6e34..661896d 100644 --- a/jigasi.sh +++ b/jigasi.sh @@ -8,6 +8,12 @@ # https://github.com/jitsi/jigasi/pull/130 ####################################################### +#Check if user is root +if ! [ $(id -u) = 0 ]; then + echo "You need to be root or have sudo privileges!" + exit 0 +fi + clear echo ' ########################################################################