mirror of
https://github.com/itiligent/Easy-Guacamole-Installer.git
synced 2025-12-13 01:42:31 +00:00
add sudo perm checks for both debian and ubuntu
This commit is contained in:
parent
8bac99b447
commit
690467c912
1 changed files with 2 additions and 3 deletions
|
|
@ -52,10 +52,9 @@ if ! command -v sudo &> /dev/null; then
|
|||
fi
|
||||
|
||||
# Make sure the user running setup is a member of the sudo group
|
||||
if ! [[ $(id -nG "$USER" 2>/dev/null | egrep "sudo" | wc -l) -gt 0 ]]; then
|
||||
if ! id -nG "$USER" | grep -qw "sudo"; then
|
||||
echo
|
||||
echo -e "${LRED}The current user (${USER}) must be a member of the 'sudo' group. Run: sudo usermod -aG sudo ${USER}" 1>&2
|
||||
echo -e ${NC}
|
||||
echo -e "${LRED}The current user (${USER}) must be a member of the 'sudo' group. Run: sudo usermod -aG sudo ${USER}${NC}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue