This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| MY_URL="http://moefou.org" #change you website | |
| RESULT_502=`curl -I $MY_URL|grep "HTTP/1.1 502"` | |
| RESULT_504=`curl -I $MY_URL|grep "HTTP/1.1 504"` | |
| if [ -n "$RESULT_502" ]; then | |
| killall php-fpm;php-fpm | |
| date>>/data/logs/web_error.log;echo "502 Bad Gateway">>/data/logs/web_error.log | |
| elif [ -n "$RESULT_504" ]; then | |
| killall php-fpm;php-fpm | |
| date>>/data/logs/web_error.log;echo "504 Gateway Time-out">>/data/logs/web_error.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # nginx - this script starts and stops the nginx daemin | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
| # proxy and IMAP/POP3 proxy server | |
| # processname: nginx | |
| # config: /etc/nginx/nginx.conf | |
| # pidfile: /var/run/nginx.pid |