diff --git a/lib/general b/lib/general index 713abe9..e8128ca 100644 --- a/lib/general +++ b/lib/general @@ -1,6 +1,6 @@ #!/bin/bash -readonly app_version="1.10.1" +readonly app_version="1.10.2" readonly svr_version="1.4" readonly os_ubuntu_supported=(xenial bionic) readonly php_supported=(7.2 7.3 7.4) diff --git a/lib/sites b/lib/sites index 2575c64..bab401b 100644 --- a/lib/sites +++ b/lib/sites @@ -1266,15 +1266,15 @@ list_sites() { do domi=$(echo $site | cut -f 5 -d "/") if [[ $domi != "default" && $domi != $(conf_read tools-port) ]]; then - [[ -f /var/www/$domi ]] && sign="${gre} +" || sign="${blu} *${gre}" + [[ -d /var/www/$domi ]] && sign="${gre} +" || sign="${blu} *${gre}" [[ ! -L /etc/nginx/sites-enabled/$domi ]] && sign="${red} -" outlist="$sign $domi ${end}" if [[ $list == "raw" || $raw =~ ^(all|parked|disabled|main|true)$ ]]; then outlist="$domi" - [[ $raw == "parked" && -f /var/www/$domi ]] && outlist="" + [[ $raw == "parked" && -d /var/www/$domi ]] && outlist="" [[ $raw == "disabled" && -L /etc/nginx/sites-enabled/$domi ]] && outlist="" - [[ $raw == "main" && ( ! -L /etc/nginx/sites-enabled/$domi || ! -f /var/www/$domi ) ]] && outlist="" + [[ $raw == "main" && ( ! -L /etc/nginx/sites-enabled/$domi || ! -d /var/www/$domi ) ]] && outlist="" elif [[ -n $raw ]]; then echo "${red}[ERROR] Please, enter a valid value for RAW!${end}" exit 1 diff --git a/lib/webin b/lib/webin index 8144c46..d7a64f2 100644 --- a/lib/webin +++ b/lib/webin @@ -1089,11 +1089,11 @@ nginx_blockip() { if [[ -z $purge ]]; then if [[ -n $list ]]; then echo "" - [[ -n $raw ]] && sign="" || sign="${blu}+ " + [[ $list == "raw" || -n $raw ]] && sign="" || sign="${blu}+ " if [[ -s /etc/nginx/conf.d/blockips.conf ]]; then sudo sed -n "s/^deny /${sign}/p;" /etc/nginx/conf.d/blockips.conf | sudo sed -n 's/;$//p' else - echo "[Empty] No IP's were found!" + [[ $list != "raw" && -z $raw ]] && echo "[Empty] No IP's were found!" fi [[ $list == "raw" || -n $raw ]] && echo "" || echo "${end}" else diff --git a/plugins/httpauth b/plugins/httpauth index 9975a2c..e59bef1 100644 --- a/plugins/httpauth +++ b/plugins/httpauth @@ -146,15 +146,15 @@ elif [[ -n $whitelist ]]; then api-events_update ha4 if [[ -z $purge ]]; then if [[ -n $list ]]; then - [[ -n $raw ]] && echo "" || echo "${blu}" + [[ $list == "raw" || -n $raw ]] && echo "" || echo "${blu}" if [[ -f /etc/nginx/apps.d/whitelist-acl.conf && -z $raw ]]; then sudo sed -n 's/^allow //p;' /etc/nginx/apps.d/whitelist-acl.conf | sudo sed -n 's/;$//p' | sed 's/^/+ /' elif [[ -f /etc/nginx/apps.d/whitelist-acl.conf && -n $raw ]]; then sudo sed -n 's/^allow //p;' /etc/nginx/apps.d/whitelist-acl.conf | sudo sed -n 's/;$//p' else - echo "[Empty] No IP's were found!" + [[ $list != "raw" && -z $raw ]] && echo "[Empty] No IP's were found!" fi - [[ -n $raw ]] && echo "" || echo "${end}" + [[ $list == "raw" || -n $raw ]] && echo "" || echo "${end}" else [[ $whitelist == true ]] && read -p "${blu}IP address to whitelist: ${end}" whitelist if [[ $(ip_check $whitelist) == "true" ]]; then @@ -294,7 +294,7 @@ elif [[ $list == "protected" && -n $domain ]]; then elif [[ -f /etc/nginx/apps.d/$domain-nginx.conf && -n $raw ]]; then sudo sed -n 's/^# Path: //p;' /etc/nginx/apps.d/$domain-nginx.conf elif [[ -z $root ]]; then - echo "[Empty] No protected paths were found!" + [[ -z $raw ]] && echo "[Empty] No protected paths were found!" fi [[ -n $raw ]] && echo "" || echo "${end}" nginx_not="true" # Nginx-Reload not-needed.