mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
[global]
|
||||
pid = /run/php/php{$PHP_VERSION}-fpm.pid
|
||||
error_log = /var/log/php{$PHP_VERSION}-fpm.log
|
||||
include=/etc/php/{$PHP_VERSION}/fpm/pool.d/*.conf
|
||||
php_value[auto_prepend_file]={$SERVER_PATH}/php/app_start.php
|
||||
@@ -72,8 +72,7 @@ def getFpmFile(version):
|
||||
|
||||
def status(version):
|
||||
# ps -ef|grep 'php/81' |grep -v grep | grep -v python | awk '{print $2}
|
||||
cmd = "ps -ef|grep 'php/" + version + \
|
||||
"' |grep -v grep | grep -v python | awk '{print $2}'"
|
||||
cmd = "ps -ef|grep 'php/" + version + "' |grep -v grep | grep -v python | awk '{print $2}'"
|
||||
data = mw.execShell(cmd)
|
||||
if data[0] == '':
|
||||
return 'stop'
|
||||
@@ -170,6 +169,15 @@ def deleteConfList(version):
|
||||
if os.path.exists(enable_conf):
|
||||
os.remove(enable_conf)
|
||||
|
||||
def phpFpmReplace(version):
|
||||
desc_php_fpm = getServerDir() + '/' + version + '/fpm/php-fpm.conf'
|
||||
if not os.path.exists(desc_php_fpm):
|
||||
tpl_php_fpm = getPluginDir() + '/conf/php-fpm.conf'
|
||||
content = mw.readFile(tpl_php_fpm)
|
||||
content = contentReplace(content, version)
|
||||
mw.writeFile(desc_php_fpm, content)
|
||||
return True
|
||||
|
||||
|
||||
def initReplace(version):
|
||||
makeOpConf(version)
|
||||
|
||||
Reference in New Issue
Block a user