diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index dfb88ee73..67d905fc8 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -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] == '': diff --git a/plugins/openresty/js/openresty.js b/plugins/openresty/js/openresty.js index 535e91e9e..051e35963 100755 --- a/plugins/openresty/js/openresty.js +++ b/plugins/openresty/js/openresty.js @@ -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});