From 7b89b1d98d9c537877ed72c5fe20d64391e0bad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristhian=20Mart=C3=ADnez=20Ochoa?= Date: Fri, 2 Nov 2018 19:52:56 -0700 Subject: [PATCH] small fix better sudo/root check --- weby | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weby b/weby index 55d9ce1..10312ab 100644 --- a/weby +++ b/weby @@ -14,7 +14,7 @@ if ! [[ $distr == "Ubuntu" && $osver =~ ^(xenial|bionic)$ ]]; then read -p "Press [Enter] key to Continue or [Ctrl+C] to Cancel..." fi # Check for sudo/root privileges -if ! groups $USERNAME | grep &>/dev/null '\bsudo\b' | groups $USERNAME | grep &>/dev/null '\broot\b'; then +if ! $(groups $USERNAME | grep &>/dev/null '\bsudo\b' || groups $USERNAME | grep &>/dev/null '\broot\b'); then echo "$(tput setaf 1)" echo "**** [ERROR] sudo/root privileges are required to install Webinoly ****" echo "$(tput sgr0)"