diff --git a/plugins/op_waf/install.sh b/plugins/op_waf/install.sh index dd59aff37..6cb56a832 100755 --- a/plugins/op_waf/install.sh +++ b/plugins/op_waf/install.sh @@ -23,6 +23,9 @@ else BAK='' fi +# /www/server/openresty/luajit/bin/luajit /www/server/op_waf/waf/lua/waf_common.lua +# /www/server/openresty/luajit/bin/luajit -bl /www/server/op_waf/waf/lua/waf_common.lua + Install_App(){ diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 41df33273..b3df55ff4 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -436,18 +436,22 @@ def runInfo(): data['Waiting'] = tmp[15] return mw.getJson(data) except Exception as e: - url = 'http://' + mw.getHostAddr() + ':%s/nginx_status' % port - result = mw.httpGet(url) - tmp = result.split() - data = {} - data['active'] = tmp[2] - data['accepts'] = tmp[9] - data['handled'] = tmp[7] - data['requests'] = tmp[8] - data['Reading'] = tmp[11] - data['Writing'] = tmp[13] - data['Waiting'] = tmp[15] - return mw.getJson(data) + try: + url = 'http://' + mw.getHostAddr() + ':%s/nginx_status' % port + result = mw.httpGet(url) + tmp = result.split() + data = {} + data['active'] = tmp[2] + data['accepts'] = tmp[9] + data['handled'] = tmp[7] + data['requests'] = tmp[8] + data['Reading'] = tmp[11] + data['Writing'] = tmp[13] + data['Waiting'] = tmp[15] + return mw.getJson(data) + except Exception as e: + return mw.returnJson(False, "oprenresty异常!") + except Exception as e: return mw.returnJson(False, "oprenresty not started!") diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 7b6f9b7fd..66ac75122 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -5,6 +5,8 @@ export PATH # cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4 # cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4 +# cd /www/server/mdserver-web && python3 plugins/openresty/index.py run_info + curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath")