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