#! /bin/sh
while [ true ];do
#!监听指定url状态码
if [ `curl -I -m 10 -o /dev/null -s -w %{http_code} http://www.test.com/index.php` -eq 502 ];
then
#!重启php
/etc/init.d/php-fpm-52 restart
else
echo ok;
fi
sleep 3
done
通过shell脚本监测php运行状态,重启php
最新推荐文章于 2022-09-15 14:33:36 发布