This commit is contained in:
Mr Chen
2018-12-19 15:41:00 +08:00
parent 6e4e7bcf68
commit bfc0b9efa3
2 changed files with 19 additions and 0 deletions
+13
View File
@@ -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')