openresty丰富错误信息。

This commit is contained in:
midoks
2022-06-29 02:22:43 +08:00
parent e8da5af673
commit ccc31de2d2
2 changed files with 10 additions and 4 deletions
+6
View File
@@ -209,6 +209,12 @@ def status():
def restyOp(method):
file = initDreplace()
# 启动时,先检查一下配置文件
check = getServerDir() + "/bin/openresty -t"
check_data = mw.execShell(check)
if check_data[1].find('test failed') != -1:
return check_data[1]
if not mw.isAppleSystem():
data = mw.execShell('systemctl ' + method + ' openresty')
if data[1] == '':
+4 -4
View File
@@ -97,12 +97,12 @@ function orPluginOpServiceOp(a,b,c,d,a,v){
}
if( g.status && g.data != 'ok' ) {
layer.msg(g.data, {icon: 2,time: 3000,shade: 0.3,shadeClose: true});
layer.msg(g.data, {icon: 2,time: 10000,shade: 0.3});
}
setTimeout(function(){
location.reload();
},2000);
// setTimeout(function(){
// location.reload();
// },2000);
},'json').error(function() {
layer.close(e);
layer.msg('操作异常!', {icon: 2});