Merge branch 'master' into mysql-ya

pull/121/head
midoks 3 years ago
commit d609d236ed
  1. 2
      class/core/config_api.py
  2. 2
      plugins/openresty/index.py
  3. 2
      plugins/php/conf/php-fpm.conf
  4. 10
      plugins/php/index.py
  5. 5
      plugins/php/init.d/php.service.52.tpl
  6. 7
      plugins/php/init.d/php.service.tpl
  7. 1
      scripts/install/centos.sh
  8. 2
      scripts/update/centos.sh

@ -17,7 +17,7 @@ class config_api:
# 进行中.
# 兼容主流Linux系统
__version = '0.8.6.3'
__version = '0.8.6.4'
def __init__(self):
pass

@ -207,7 +207,7 @@ def restyOp(method):
data = mw.execShell('systemctl ' + method + ' openresty')
if data[1] == '':
return 'ok'
return 'fail'
return data[1]
data = mw.execShell(file + ' ' + method)
if data[1] == '':

@ -1,4 +1,6 @@
[global]
pid = run/php-fpm.pid
error_log = log/php-fpm.log
include={$SERVER_PATH}/php/{$PHP_VERSION}/etc/php-fpm.d/*.conf
php_value[auto_prepend_file]={$SERVER_PATH}/php/app_start.php

@ -256,6 +256,9 @@ def initReplace(version):
systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/php' + version + '.service'
systemServiceTpl = getPluginDir() + '/init.d/php.service.tpl'
if version == '52':
systemServiceTpl = getPluginDir() + '/init.d/php.service.52.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
service_path = mw.getServerDir()
se_content = mw.readFile(systemServiceTpl)
@ -271,6 +274,9 @@ def phpOp(version, method):
file = initReplace(version)
if not mw.isAppleSystem():
if method == 'stop' or method == 'restart':
mw.execShell(file + ' ' + 'stop')
data = mw.execShell('systemctl ' + method + ' php' + version)
if data[1] == '':
return 'ok'
@ -302,7 +308,9 @@ def restart(version):
def reload(version):
return phpOp(version, 'restart')
if version == '52':
return phpOp(version, 'restart')
return phpOp(version, 'reload')
def initdStatus(version):

@ -8,9 +8,8 @@ After=network.target
[Service]
Type=forking
ExecStart={$SERVER_PATH}/php/{$VERSION}/sbin/php-fpm --daemonize --fpm-config {$SERVER_PATH}/php/{$VERSION}/etc/php-fpm.conf
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -USR2 $MAINPID
ExecStart={$SERVER_PATH}/php/init.d/php{$VERSION} start
ExecStop={$SERVER_PATH}/php/init.d/php{$VERSION} stop
PrivateTmp=false
[Install]

@ -7,10 +7,9 @@ Description=The PHP {$VERSION} FastCGI Process Manager
After=network.target
[Service]
Type=forking
ExecStart={$SERVER_PATH}/php/init.d/php{$VERSION} start
ExecStop={$SERVER_PATH}/php/init.d/php{$VERSION} stop
ExecReload={$SERVER_PATH}/php/init.d/php{$VERSION} reload
PIDFile={$SERVER_PATH}/php/{$VERSION}/var/run/php-fpm.pid
ExecStart={$SERVER_PATH}/php/{$VERSION}/sbin/php-fpm --nodaemonize --fpm-config {$SERVER_PATH}/php/{$VERSION}/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=false
[Install]

@ -77,6 +77,7 @@ if [ "$?" != "0" ];then
yum install -y dnf dnf-plugins-core
dnf config-manager --set-enabled powertools
yum install -y oniguruma oniguruma-devel
dnf upgrade -y libmodulemd
fi
yum install -y libzstd-devel

@ -57,4 +57,4 @@ do
done
echo -e "start mw success"
/etc/init.d/mw default
bash /etc/init.d/mw default
Loading…
Cancel
Save