Update index.py

This commit is contained in:
midoks 2022-11-21 15:13:38 +08:00
parent fd2f838712
commit d08c5bd511
1 changed files with 13 additions and 0 deletions

View File

@ -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'