From d9feb9bd9a51122ddb033eef3edba88d22579c07 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 18 Dec 2018 23:22:08 +0800 Subject: [PATCH] Update index.py --- plugins/php/index.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/php/index.py b/plugins/php/index.py index 1c33154e7..ef4d19fc5 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -126,8 +126,16 @@ def phpFpmWwwReplace(version): public.writeFile(service_php_fpmwww, content) +def makePhpIni(version): + d_ini = public.getServerDir() + '/php/' + version + '/etc/php.ini' + if not os.path.exists(d_ini): + s_ini = getPluginDir() + '/conf/php.ini' + shutil.copyfile(s_ini, d_ini) + + def initReplace(version): makeOpenrestyConf() + makePhpIni(version) initD_path = getServerDir() + '/init.d' file_bin = initD_path + '/php' + version