VPS侦探论坛

 找回密码
 注册
查看: 4282|回复: 1

lnmpa1.3 check502.sh无效

[复制链接]
发表于 2016-3-11 09:18:34 | 显示全部楼层 |阅读模式

lnmpa1.3 check502.sh无效脚本内容(有安装curl,网址有配置正确,发现502的时候不会自动重启):
#!/bin/bash
# author: licess
# website: http://www.lnmp.org

CheckURL="http://www.xxx.com"

STATUS_CODE=`curl -o /dev/null -m 10 --connect-timeout 10 -s -w %{http_code} $CheckURL`
#echo "$CheckURL Status Code:\t$STATUS_CODE"
if [ "$STATUS_CODE" = "502" ]; then
    /etc/init.d/php-fpm restart

手动执行里面的自动重启语句(/etc/init.d/php-fpm restart)出现错误:
[root@aaa tools]# /etc/init.d/php-fpm restart
-bash: /etc/init.d/php-fpm: 没有那个文件或目录


要手动执行以下两条命令才不会出现502
/etc/init.d/nginx restart
/etc/init.d/httpd restart
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-3-11 15:22:48 | 显示全部楼层


502脚本是给lnmp用的不是lnmpa用的

你可以将里面的/etc/init.d/php-fpm restart替换为/etc/init.d/httpd restart 试试
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 23:32 , Processed in 0.024964 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表