small fix
better sudo/root check
This commit is contained in:
parent
e27fdf45b8
commit
7b89b1d98d
2
weby
2
weby
|
@ -14,7 +14,7 @@ if ! [[ $distr == "Ubuntu" && $osver =~ ^(xenial|bionic)$ ]]; then
|
||||||
read -p "Press [Enter] key to Continue or [Ctrl+C] to Cancel..."
|
read -p "Press [Enter] key to Continue or [Ctrl+C] to Cancel..."
|
||||||
fi
|
fi
|
||||||
# Check for sudo/root privileges
|
# 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 "$(tput setaf 1)"
|
||||||
echo "**** [ERROR] sudo/root privileges are required to install Webinoly ****"
|
echo "**** [ERROR] sudo/root privileges are required to install Webinoly ****"
|
||||||
echo "$(tput sgr0)"
|
echo "$(tput sgr0)"
|
||||||
|
|
Loading…
Reference in a new issue