mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 05:59:25 +08:00
openresty丰富错误信息。
This commit is contained in:
@@ -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] == '':
|
||||
|
||||
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user