pull/727/head
dami 4 weeks ago
parent 00d3aaeb22
commit 3029f8d263
  1. 3
      plugins/op_waf/install.sh
  2. 28
      plugins/openresty/index.py
  3. 2
      plugins/openresty/install.sh

@ -23,6 +23,9 @@ else
BAK='' BAK=''
fi 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(){ Install_App(){

@ -436,18 +436,22 @@ def runInfo():
data['Waiting'] = tmp[15] data['Waiting'] = tmp[15]
return mw.getJson(data) return mw.getJson(data)
except Exception as e: except Exception as e:
url = 'http://' + mw.getHostAddr() + ':%s/nginx_status' % port try:
result = mw.httpGet(url) url = 'http://' + mw.getHostAddr() + ':%s/nginx_status' % port
tmp = result.split() result = mw.httpGet(url)
data = {} tmp = result.split()
data['active'] = tmp[2] data = {}
data['accepts'] = tmp[9] data['active'] = tmp[2]
data['handled'] = tmp[7] data['accepts'] = tmp[9]
data['requests'] = tmp[8] data['handled'] = tmp[7]
data['Reading'] = tmp[11] data['requests'] = tmp[8]
data['Writing'] = tmp[13] data['Reading'] = tmp[11]
data['Waiting'] = tmp[15] data['Writing'] = tmp[13]
return mw.getJson(data) data['Waiting'] = tmp[15]
return mw.getJson(data)
except Exception as e:
return mw.returnJson(False, "oprenresty异常!")
except Exception as e: except Exception as e:
return mw.returnJson(False, "oprenresty not started!") return mw.returnJson(False, "oprenresty not started!")

@ -5,6 +5,8 @@ export PATH
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4 # 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/plugins/openresty && bash install.sh install 1.21.4
# cd /www/server/mdserver-web && python3 plugins/openresty/index.py run_info
curPath=`pwd` curPath=`pwd`
rootPath=$(dirname "$curPath") rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath")

Loading…
Cancel
Save