pull/121/head
midoks 3 years ago
parent 789c5d85b5
commit 5192c233e3
  1. 9
      plugins/php-apt/index.py
  2. 8
      plugins/php-yum/index.py
  3. 6
      plugins/php/index.py

@ -124,12 +124,12 @@ def makeOpConf(version):
dst_dir = sdir + '/web_conf/php'
dst_dir_conf = sdir + '/web_conf/php/conf'
if not os.path.exists(dst_dir):
mw.execShell('mkdir -p ' + dst_dir)
if not os.path.exists(dst_dir_conf):
mw.execShell('mkdir -p ' + dst_dir_conf)
if not os.path.exists(dst_dir_status):
mw.execShell('mkdir -p ' + dst_dir_status)
info = getPluginDir() + '/info.json'
content = mw.readFile(info)
content = json.loads(content)
@ -164,7 +164,6 @@ def phpFpmWwwReplace(version):
def deleteConfList(version):
sdir = mw.getServerDir()
enable_conf = sdir + '/web_conf/php/conf/enable-php-apt' + version + '.conf'
status_conf = sdir + '/web_conf/php/status/phpfpm_status_apt' + version + '.conf'
clist = (status_conf, enable_conf)
for f in clist:
@ -529,7 +528,7 @@ def setDisableFunc(version):
def getPhpinfo(version):
stat = status(version)
if stat == 'stop':
return mw.returnJson(False, 'PHP[' + version + ']未启动!!!')
return 'PHP[' + version + ']未启动,不可访问!!!'
sock_file = getFpmAddress(version)
root_dir = mw.getRootDir() + '/phpinfo'

@ -120,12 +120,12 @@ def makeOpenrestyConf(version):
dst_dir = sdir + '/web_conf/php'
dst_dir_conf = sdir + '/web_conf/php/conf'
if not os.path.exists(dst_dir):
mw.execShell('mkdir -p ' + dst_dir)
if not os.path.exists(dst_dir_conf):
mw.execShell('mkdir -p ' + dst_dir_conf)
if not os.path.exists(dst_dir_status):
mw.execShell('mkdir -p ' + dst_dir_status)
info = getPluginDir() + '/info.json'
content = mw.readFile(info)
content = json.loads(content)
@ -527,7 +527,7 @@ def setDisableFunc(version):
def getPhpinfo(version):
stat = status(version)
if stat == 'stop':
return mw.returnJson(False, 'PHP[' + version + ']未启动!!!')
return 'PHP[' + version + ']未启动,不可访问!!!'
sock_file = getFpmAddress(version)
root_dir = mw.getRootDir() + '/phpinfo'

@ -131,16 +131,12 @@ def makeOpenrestyConf():
dst_dir = sdir + '/web_conf/php'
dst_dir_conf = sdir + '/web_conf/php/conf'
dst_dir_status = sdir + '/web_conf/php/status'
if not os.path.exists(dst_dir):
mw.execShell('mkdir -p ' + dst_dir)
if not os.path.exists(dst_dir_conf):
mw.execShell('mkdir -p ' + dst_dir_conf)
if not os.path.exists(dst_dir_status):
mw.execShell('mkdir -p ' + dst_dir_status)
d_pathinfo = sdir + '/web_conf/php/pathinfo.conf'
if not os.path.exists(d_pathinfo):
s_pathinfo = getPluginDir() + '/conf/pathinfo.conf'
@ -651,7 +647,7 @@ def setDisableFunc(version):
def getPhpinfo(version):
stat = status(version)
if stat == 'stop':
return mw.returnJson(False, 'PHP[' + version + ']未启动!!!')
return 'PHP[' + version + ']未启动,不可访问!!!'
sock_file = getFpmAddress(version)
root_dir = mw.getRootDir() + '/phpinfo'

Loading…
Cancel
Save