mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
update
This commit is contained in:
@@ -80,6 +80,12 @@ def isInstalledWeb():
|
||||
return False
|
||||
|
||||
|
||||
def restartWeb():
|
||||
if isInstalledWeb():
|
||||
initd = getServerDir() + '/openresty/init.d/openresty'
|
||||
execShell(initd + ' ' + 'reload')
|
||||
|
||||
|
||||
def M(table):
|
||||
sql = db.Sql()
|
||||
return sql.table(table)
|
||||
|
||||
@@ -399,7 +399,20 @@ def setFpmConfig(version):
|
||||
return public.returnJson(True, '设置成功')
|
||||
|
||||
|
||||
def checkFpmStatusFile(version):
|
||||
if public.isInstalledWeb():
|
||||
desc_file = public.getServerDir(
|
||||
) + '/openresty/nginx/conf/php_status/phpfpm_status_' + version + '.conf'
|
||||
if not os.path.exists(desc_file):
|
||||
tpl = getPluginDir() + '/conf/phpfpm_status.conf'
|
||||
content = public.readFile(tpl)
|
||||
content = contentReplace(content, version)
|
||||
public.writeFile(desc_file, content)
|
||||
public.restartWeb()
|
||||
|
||||
|
||||
def getFpmStatus(version):
|
||||
checkFpmStatusFile(version)
|
||||
|
||||
result = public.httpGet(
|
||||
'http://127.0.0.1/phpfpm_status_' + version + '?json')
|
||||
|
||||
Reference in New Issue
Block a user