check_webservice_load.sh: remove cariable 'LOGGING'.
This commit is contained in:
		| @@ -41,7 +41,7 @@ clean_up() { | ||||
|  | ||||
|    # Perform program exit housekeeping | ||||
|    rm -rf "$LOCK_DIR" | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo "" | ||||
|    fi | ||||
|    exit $1 | ||||
| @@ -160,10 +160,8 @@ blank_line() { | ||||
|  | ||||
| if [[ -t 1 ]] ; then | ||||
|    terminal=true | ||||
|    LOGGING=true | ||||
| else | ||||
|    terminal=false | ||||
|    LOGGING=false | ||||
| fi | ||||
|  | ||||
| # - Detect linux distribution | ||||
| @@ -1821,7 +1819,7 @@ if $check_load ; then | ||||
|  | ||||
|    #echo "" > $LOCK_DIR/extra_msg.txt | ||||
|  | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo -e "\nChecking Load on \"`hostname -f`\".." | ||||
|    fi | ||||
|  | ||||
| @@ -1934,7 +1932,7 @@ EOF | ||||
|       start_apache | ||||
|  | ||||
|    else | ||||
|       if $LOGGING ; then | ||||
|       if $terminal ; then | ||||
|          ok "Load on \"`hostname -f`\" seems to be fine.." | ||||
|          cat<<EOF | ||||
|              Server Name...................: `hostname -f` | ||||
| @@ -1962,7 +1960,7 @@ if $check_mysql ; then | ||||
|  | ||||
|    echo "" > $LOCK_DIR/extra_msg.txt | ||||
|  | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo -e "\nChecking Mysql databse service  on \"`hostname -f`\".." | ||||
|    fi | ||||
|  | ||||
| @@ -1989,7 +1987,7 @@ if $check_mysql ; then | ||||
|  | ||||
|       else | ||||
|  | ||||
|          if $LOGGING ; then | ||||
|          if $terminal ; then | ||||
|             ok "MySQL database service on \"`hostname -f`\" seems to be running.." | ||||
|          fi | ||||
|       fi | ||||
| @@ -2007,7 +2005,7 @@ if $check_postgresql ; then | ||||
|  | ||||
|    echo "" > $LOCK_DIR/extra_msg.txt | ||||
|  | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo -e "\nChecking PostgreSQL database service on \"`hostname -f`\".." | ||||
|    fi | ||||
|  | ||||
| @@ -2025,7 +2023,7 @@ if $check_postgresql ; then | ||||
|  | ||||
|    else | ||||
|  | ||||
|       if $LOGGING ; then | ||||
|       if $terminal ; then | ||||
|          ok "PostgreSQL database server on \"`hostname -f`\" seems to be running.." | ||||
|       fi | ||||
|  | ||||
| @@ -2043,7 +2041,7 @@ if $check_apache ; then | ||||
|  | ||||
|    echo "" > $LOCK_DIR/extra_msg.txt | ||||
|  | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo -e "\nChecking Apache webservice on \"`hostname -f`\".." | ||||
|    fi | ||||
|  | ||||
| @@ -2075,7 +2073,7 @@ if $check_apache ; then | ||||
|  | ||||
|       else | ||||
|  | ||||
|          if $LOGGING ; then | ||||
|          if $terminal ; then | ||||
|             ok "Apache Webserver on \"`hostname -f`\" seems to be running.." | ||||
|          fi | ||||
|       fi | ||||
| @@ -2093,7 +2091,7 @@ if $check_nginx ; then | ||||
|  | ||||
|    echo "" > $LOCK_DIR/extra_msg.txt | ||||
|  | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo -e "\nChecking Nginx webservice on \"`hostname -f`\".." | ||||
|    fi | ||||
|  | ||||
| @@ -2122,14 +2120,14 @@ if $check_nginx ; then | ||||
|  | ||||
|                restart_nginx | ||||
|             else | ||||
|                if $LOGGING ; then | ||||
|                if $terminal ; then | ||||
|                   ok "Nginx Webserver on \"`hostname -f`\" seems to be running.." | ||||
|                fi | ||||
|             fi | ||||
|           | ||||
|          else | ||||
|  | ||||
|             if $LOGGING ; then | ||||
|             if $terminal ; then | ||||
|                ok "Nginx Webserver on \"`hostname -f`\" seems to be running.." | ||||
|             fi | ||||
|  | ||||
| @@ -2137,7 +2135,7 @@ if $check_nginx ; then | ||||
|  | ||||
|       else | ||||
|  | ||||
|          if $LOGGING ; then | ||||
|          if $terminal ; then | ||||
|             ok "Nginx Webserver on \"`hostname -f`\" seems to be running.." | ||||
|          fi | ||||
|  | ||||
| @@ -2158,7 +2156,7 @@ if $check_php_fpm ; then | ||||
|  | ||||
|       echo "" > $LOCK_DIR/extra_msg.txt | ||||
|  | ||||
|       if $LOGGING ; then | ||||
|       if $terminal ; then | ||||
|          echo -e "\nChecking PHP-FPM v$_version (FastCGI Process Manager) on \"`hostname -f`\".." | ||||
|       fi | ||||
|       PID=$(ps aux | grep "php-fpm: " | grep "master" | grep -E "[-|\(]?${php_fpm_pid_search_path[$_version]}" | grep -v grep | awk '{print$2}') | ||||
| @@ -2187,12 +2185,12 @@ if $check_php_fpm ; then | ||||
|  | ||||
|                restart_php_fpm $_version | ||||
|             else | ||||
|                if $LOGGING ; then | ||||
|                if $terminal ; then | ||||
|                   ok "PHP-FPM v$_version engine on \"`hostname -f`\" seems to be running.." | ||||
|                fi | ||||
|             fi | ||||
|          else | ||||
|             if $LOGGING ; then | ||||
|             if $terminal ; then | ||||
|                ok "PHP-FPM v$_version engine on \"`hostname -f`\" seems to be running.." | ||||
|             fi | ||||
|          fi | ||||
| @@ -2211,7 +2209,7 @@ if $check_redis ; then | ||||
|  | ||||
|    echo "" > $LOCK_DIR/extra_msg.txt | ||||
|  | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo -e "\nChecking Redis Caching Service on \"`hostname -f`\".." | ||||
|    fi | ||||
|  | ||||
| @@ -2227,7 +2225,7 @@ if $check_redis ; then | ||||
|  | ||||
|    else | ||||
|  | ||||
| 		if $LOGGING ; then | ||||
| 		if $terminal ; then | ||||
| 			ok "Redis Caching Service on \"`hostname -f`\" seems to be running.." | ||||
| 		fi | ||||
|  | ||||
| @@ -2245,7 +2243,7 @@ if $check_website ; then | ||||
|  | ||||
|    send_msg=false | ||||
|  | ||||
|    if $LOGGING ; then | ||||
|    if $terminal ; then | ||||
|       echo -e "\nDo some extra checks.." | ||||
|    fi | ||||
|  | ||||
| @@ -2323,7 +2321,7 @@ if $check_website ; then | ||||
|  | ||||
|    else | ||||
|  | ||||
|       if $LOGGING ; then | ||||
|       if $terminal ; then | ||||
|          ok "URL $is_working_url is responding as expected." | ||||
|       fi | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user