From d08c5bd511e1d01474f1c56982fb623d332ce8be Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 21 Nov 2022 15:13:38 +0800 Subject: [PATCH] Update index.py --- plugins/php-yum/index.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/php-yum/index.py b/plugins/php-yum/index.py index a9a482767..f35de40c9 100755 --- a/plugins/php-yum/index.py +++ b/plugins/php-yum/index.py @@ -175,6 +175,19 @@ def initReplace(version): makeOpenrestyConf(version) phpFpmWwwReplace(version) + install_ok = getServerDir() + "/" + version + "/install.ok" + if not os.path.exists(install_ok): + phpini = getConf(version) + ssl_crt = mw.getSslCrt() + + cmd_openssl = "sed -i \"s#;openssl.cafile=#openssl.cafile=${crtPath}#\" " + \ + ssl_crt + "/etc/php.ini" + mw.execShell(cmd_openssl) + cmd_curl = "sed -i \"s#;curl.cainfo =#curl.cainfo=${crtPath}#\" " + \ + ssl_crt + "/etc/php.ini" + mw.execShell(cmd_curl) + mw.writeFile(install_ok, 'ok') + # systemd # mw.execShell('systemctl daemon-reload') return 'ok'