From 4ae4546d6d523973a14b819911fe51d7298d7051 Mon Sep 17 00:00:00 2001 From: Chase Wright Date: Sat, 1 Sep 2018 09:33:32 -0500 Subject: [PATCH] Add root/sudo check Add root/sudo check thanks to @bmullan --- guac-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guac-install.sh b/guac-install.sh index 13d3bd9..ce5fbcd 100644 --- a/guac-install.sh +++ b/guac-install.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Check if user is root or sudo +if ! [ $(id -u) = 0 ]; then echo "Please run this script as sudo or root"; exit 1 ; fi + # Version number of Guacamole to install GUACVERSION="0.9.14"