mirror of
https://github.com/itiligent/Easy-Guacamole-Installer.git
synced 2025-12-13 18:02:32 +00:00
check sudo group membership to run
This commit is contained in:
parent
f284400eab
commit
3a95300365
1 changed files with 2 additions and 2 deletions
|
|
@ -34,14 +34,14 @@ NC='\033[0m' #No Colour
|
||||||
|
|
||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
echo
|
echo
|
||||||
echo -e "${LRED}This script must NOT be run as root" 1>&2
|
echo -e "${LRED}This script must NOT be run as root, exiting..." 1>&2
|
||||||
echo -e ${NC}
|
echo -e ${NC}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ $(id -nG "$USER" 2>/dev/null | egrep "sudo" | wc -l) -gt 0 ]; then
|
if ! [ $(id -nG "$USER" 2>/dev/null | egrep "sudo" | wc -l) -gt 0 ]; then
|
||||||
echo
|
echo
|
||||||
echo -e "${LRED}The current user (${USER}) does not belong to 'sudo' group." 1>&2
|
echo -e "${LRED}The current user (${USER}) must be a member of the 'sudo' group, exiting..." 1>&2
|
||||||
echo -e ${NC}
|
echo -e ${NC}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue