small fix

better sudo/root check
This commit is contained in:
Cristhian Martínez Ochoa 2018-11-02 19:52:56 -07:00
parent e27fdf45b8
commit 7b89b1d98d

2
weby
View file

@ -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)"