This commit is contained in:
2024-05-28 18:18:18 +02:00
parent 7ac4a5919c
commit 0442823389

View File

@@ -75,29 +75,29 @@ BLUE="\033[0;94m"
clear clear
# Check User Sudo Access # Check User Sudo Access
check_sudo_access() { #check_sudo_access() {
if sudo -n true 2>/dev/null; then # if sudo -n true 2>/dev/null; then
return 0 # return 0
else # else
return 1 # return 1
fi # fi
} #}
if check_sudo_access; then #if check_sudo_access; then
echo "User has SUDO Access, installation continues..." # echo "User has SUDO Access, installation continues..."
else #else
echo -e "${RED} ${NC}" # echo -e "${RED} ${NC}"
echo -e "${RED}-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'- ${NC}" # echo -e "${RED}-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'- ${NC}"
echo -e "${RED} ${NC}" # echo -e "${RED} ${NC}"
echo -e "${RED} ERROR: This installation must be run by a normal user with SUDO Access. ${NC}" # echo -e "${RED} ERROR: This installation must be run by a normal user with SUDO Access. ${NC}"
echo -e "${RED} ${NC}" # echo -e "${RED} ${NC}"
echo -e "${RED} So Add your user to sudo with this Command,from a user who has sudo access ${NC}" # echo -e "${RED} So Add your user to sudo with this Command,from a user who has sudo access ${NC}"
echo -e "${RED} sudo usermod -aG sudo USERNAME ${NC}" # echo -e "${RED} sudo usermod -aG sudo USERNAME ${NC}"
echo -e "${RED} ${NC}" # echo -e "${RED} ${NC}"
echo -e "${RED}-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'- ${NC}" # echo -e "${RED}-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'- ${NC}"
echo -e "${RED} ${NC}" # echo -e "${RED} ${NC}"
exit 1 # exit 1
fi #fi
# Check User Sudo Access Done # Check User Sudo Access Done
clear clear