diff --git a/weby b/weby index 648d358..55d9ce1 100644 --- a/weby +++ b/weby @@ -11,7 +11,14 @@ if ! [[ $distr == "Ubuntu" && $osver =~ ^(xenial|bionic)$ ]]; then echo "**** This OS is not supported by Webinoly and could not work properly ****" echo "****************************************************************************" echo "$(tput sgr0)" - read -p "Press [Enter] key to continue..." + 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 + echo "$(tput setaf 1)" + echo "**** [ERROR] sudo/root privileges are required to install Webinoly ****" + echo "$(tput sgr0)" + read -p "Press [Enter] key to Continue or [Ctrl+C] to Cancel..." fi # In case client is just Updating Webinoly and not fresh-installing we need accurate statistics.