网站状态异常时自动重启php-fpm的shell脚本

来源:互联网 发布:电脑降温软件 编辑:程序博客网 时间:2024/05/29 00:31
#!/bin/bash
resp=$(curl -Is http://jsonaz.com/|grep "502 Bad Gateway")
if [ "$resp" = "" ] 
then
echo "good"

else

$(sudo kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`)
fi
0 0
原创粉丝点击