diff --git a/client/fix_backuppc_linux_sudo.sh b/client/fix_backuppc_linux_sudo.sh index d95d344..7ba411b 100755 --- a/client/fix_backuppc_linux_sudo.sh +++ b/client/fix_backuppc_linux_sudo.sh @@ -8,7 +8,7 @@ SUCCESS=0 ERROR=1 DEBUG=1 -EUID=$(id -u) +USER_ID=$(id -u) BACKUP_USER_LOGIN="backup" SUDOERS_LINE_REGEXP="backuppc.*ALL.*=.*(ALL:ALL).*NOEXEC:NOPASSWD:.*/usr/bin/rsync" @@ -68,7 +68,7 @@ EOF # Test permissions [[[ [ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Check admin rights." -if [ "${EUID}" -ne "0" ]; then +if [ "${USER_ID}" -ne "0" ]; then printf '\e[1;31m%-6s\e[m\n' "ERROR : You need to run with SUDO/Admin permissions." exit "${ERROR}" fi