闲者博客 - 监测 https://bk1314.com/tag/%E7%9B%91%E6%B5%8B/ zh-CN Wed, 23 Feb 2022 17:23:00 +0800 Wed, 23 Feb 2022 17:23:00 +0800 宝塔定时任务监测502就重启 https://bk1314.com/16.html https://bk1314.com/16.html Wed, 23 Feb 2022 17:23:00 +0800 飞鱼 下面代码复制在宝塔定时任务 设置shell命令 建议5分钟监测一次 56是php版本哦PHP7.2就是72

#!/bin/bash
if [[ `curl -sS --connect-timeout 15 -m 15 127.0.0.1/phpfpm_56_status|grep 502` == *"502"* ]]; then
/etc/init.d/php-fpm-56 stop
/etc/init.d/php-fpm-56 start
else
echo php56 normal.
fi
]]>
0 https://bk1314.com/16.html#comments https://bk1314.com/feed/tag/%E7%9B%91%E6%B5%8B/