WDlinux官方论坛's Archiver

shaokeyinyue 发表于 2018-6-7 06:17

wdCP v3.2.21 计划任务"WEB重启"执行之后所有网站不能访问

#!/bin/bash
# wdcp tools
#
# author wdlinux
# url [url]http://www.wdlinux.cn[/url]
tld="/www/wdlinux/wdcp/logs"
[ ! -d $tld ] && mkdir -p $tld
tlf=$tld/task.log
netstat -lnpt | grep nginx && killall -9 nginx && service nginxd start && date >> $tlf && echo "nginx restart success" >> $tlf
netstat -lnpt | grep httpd && killall -9 httpd && service httpd start && date >> $tlf && echo "apache restart success" >> $tlf && exit 0
date >> $tlf && echo "web restart fail" && exit 1


以上是WDCP自带的网站重启脚本,不知道哪边有问题,请技术人员看下!

[table=98%]
[tr][td][b][color=#FF0000]计划任务[/color][/b]"WEB重启"执行之后网站不能访问, 需要手动在"系统管理-->服务重启"中执行web重启才可以重新打开网站, 请教管理员和各位高手, 这是什么原因, 如何解决.[/td][/tr]
[/table]

lzh370 发表于 2018-8-9 09:56

同样问题,楼主解决了吗?

wangyouworld 发表于 2018-8-10 11:05

[i=s] 本帖最后由 wangyouworld 于 2018-8-10 11:10 编辑 [/i]

看下启动失败的报错日志。

nginx 的在,cd /www/wdlinux/nginx/logs/

像Centos的,可以使用
service nginxd restart
service httpd restart
即可。

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.