check_webservice_load.sh: if connection failed try also SSL befor alert an error.
This commit is contained in:
parent
875465aab7
commit
c0c0b2487c
@ -2009,13 +2009,22 @@ if $check_nginx ; then
|
|||||||
else
|
else
|
||||||
if ! $ommit_curl_check_nginx ; then
|
if ! $ommit_curl_check_nginx ; then
|
||||||
|
|
||||||
if ! $(curl -Is -m 10 http://$curl_check_host | head -n 1 | grep "200 OK" > /dev/null) ; then
|
if ! $(curl -Is -m 10 http://$curl_check_host | head -n 1 | grep "200" > /dev/null) ; then
|
||||||
echo -e "\nNginx Webservice seems to be running, but is NOT responding! - Try to restart service.." >> $LOCK_DIR/extra_msg.txt
|
|
||||||
echo -e "=======================================================================================" >> $LOCK_DIR/extra_msg.txt
|
# Same but via SSL
|
||||||
|
#
|
||||||
|
if ! $(curl --insecure -Is -m 10 https://$curl_check_host | head -n 1 | grep "200" > /dev/null) ; then
|
||||||
|
echo -e "\nNginx Webservice seems to be running, but is NOT responding! - Try to restart service.." >> $LOCK_DIR/extra_msg.txt
|
||||||
|
echo -e "=======================================================================================" >> $LOCK_DIR/extra_msg.txt
|
||||||
|
|
||||||
error "Nginx Webservice seems to be running, but is NOT responding! - Try to restart service.."
|
error "Nginx Webservice seems to be running, but is NOT responding! - Try to restart service.."
|
||||||
|
|
||||||
restart_nginx
|
restart_nginx
|
||||||
|
else
|
||||||
|
if $LOGGING ; then
|
||||||
|
ok "Nginx Webserver on \"`hostname -f`\" seems to be running.."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@ -2063,16 +2072,24 @@ if $check_php_fpm ; then
|
|||||||
restart_php_fpm $_version
|
restart_php_fpm $_version
|
||||||
|
|
||||||
elif [[ -n ${php_fpm_ping_path[$_version]} ]] ; then
|
elif [[ -n ${php_fpm_ping_path[$_version]} ]] ; then
|
||||||
|
|
||||||
if ! $(curl -Is -m 10 http://${curl_check_host}/${php_fpm_ping_path[$_version]} | head -n 1 | grep "200 OK" > /dev/null) ; then
|
|
||||||
|
|
||||||
echo -e "\nPHP-FPM v$_version seems to be running, but is NOT responding! - Try to restart service.." >> $LOCK_DIR/extra_msg.txt
|
if ! $(curl -Is -m 10 http://${curl_check_host}/${php_fpm_ping_path[$_version]} | head -n 1 | grep "200" > /dev/null) ; then
|
||||||
echo -e "====================================================================================" >> $LOCK_DIR/extra_msg.txt
|
|
||||||
|
|
||||||
error "PHP-FPM v$_version seems to be running, but is NOT responding! - Try to restart service.."
|
# Same via SSL
|
||||||
|
#
|
||||||
|
if ! $(curl --insecure -Is -m 10 https://${curl_check_host}/${php_fpm_ping_path[$_version]} | head -n 1 | grep "200" > /dev/null) ; then
|
||||||
|
|
||||||
restart_php_fpm $_version
|
echo -e "\nPHP-FPM v$_version seems to be running, but is NOT responding! - Try to restart service.." >> $LOCK_DIR/extra_msg.txt
|
||||||
|
echo -e "====================================================================================" >> $LOCK_DIR/extra_msg.txt
|
||||||
|
|
||||||
|
error "PHP-FPM v$_version seems to be running, but is NOT responding! - Try to restart service.."
|
||||||
|
|
||||||
|
restart_php_fpm $_version
|
||||||
|
else
|
||||||
|
if $LOGGING ; then
|
||||||
|
ok "PHP-FPM v$_version engine on \"`hostname -f`\" seems to be running.."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if $LOGGING ; then
|
if $LOGGING ; 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.."
|
||||||
|
Loading…
Reference in New Issue
Block a user