This commit is contained in:
parent
1e603d27d2
commit
2979def4dc
|
|
@ -143,6 +143,14 @@ def systemdCfgDir():
|
|||
return "/tmp"
|
||||
|
||||
|
||||
def getSslCrt():
|
||||
if os.path.exists('/etc/ssl/certs/ca-certificates.crt'):
|
||||
return '/etc/ssl/certs/ca-certificates.crt'
|
||||
if os.path.exists('/etc/pki/tls/certs/ca-bundle.crt'):
|
||||
return '/etc/pki/tls/certs/ca-bundle.crt'
|
||||
return ''
|
||||
|
||||
|
||||
def getOs():
|
||||
return sys.platform
|
||||
|
||||
|
|
|
|||
|
|
@ -78,14 +78,6 @@ def status(version):
|
|||
return 'start'
|
||||
|
||||
|
||||
def getSslCrt():
|
||||
if os.path.exists('/etc/ssl/certs/ca-certificates.crt'):
|
||||
return '/etc/ssl/certs/ca-certificates.crt'
|
||||
if os.path.exists('/etc/pki/tls/certs/ca-bundle.crt'):
|
||||
return '/etc/pki/tls/certs/ca-bundle.crt'
|
||||
return ''
|
||||
|
||||
|
||||
def contentReplace(content, version):
|
||||
service_path = mw.getServerDir()
|
||||
content = content.replace('{$ROOT_PATH}', mw.getRootDir())
|
||||
|
|
@ -184,7 +176,7 @@ def initReplace(version):
|
|||
install_ok = getServerDir() + "/" + version + "/install.ok"
|
||||
if not os.path.exists(install_ok):
|
||||
phpini = getConf(version)
|
||||
ssl_crt = getSslCrt()
|
||||
ssl_crt = mw.getSslCrt()
|
||||
|
||||
cmd_openssl = "sed -i \"s#;openssl.cafile=#openssl.cafile=${crtPath}#\" " + \
|
||||
ssl_crt + "/etc/php.ini"
|
||||
|
|
|
|||
|
|
@ -109,21 +109,13 @@ def status(version):
|
|||
return 'start'
|
||||
|
||||
|
||||
def getSslCrt():
|
||||
if os.path.exists('/etc/ssl/certs/ca-certificates.crt'):
|
||||
return '/etc/ssl/certs/ca-certificates.crt'
|
||||
if os.path.exists('/etc/pki/tls/certs/ca-bundle.crt'):
|
||||
return '/etc/pki/tls/certs/ca-bundle.crt'
|
||||
return ''
|
||||
|
||||
|
||||
def contentReplace(content, version):
|
||||
service_path = mw.getServerDir()
|
||||
content = content.replace('{$ROOT_PATH}', mw.getRootDir())
|
||||
content = content.replace('{$SERVER_PATH}', service_path)
|
||||
content = content.replace('{$PHP_VERSION}', version)
|
||||
content = content.replace('{$LOCAL_IP}', mw.getLocalIp())
|
||||
content = content.replace('{$SSL_CRT}', getSslCrt())
|
||||
content = content.replace('{$SSL_CRT}', mw.getSslCrt())
|
||||
|
||||
if mw.isAppleSystem():
|
||||
# user = mw.execShell(
|
||||
|
|
|
|||
Loading…
Reference in New Issue