fix acme.sh alias & deb.sury gpg key

This commit is contained in:
VirtuBox
2019-03-16 10:30:52 +01:00
parent 190e0c50c7
commit 9e0f92b2cf
7 changed files with 43 additions and 41 deletions

View File

@@ -331,7 +331,7 @@ class WOSiteCreateController(CementBaseController):
(['-le', '--letsencrypt'],
dict(help="configure letsencrypt ssl for the site",
action='store' or 'store_const',
choices=('on', 'off', 'subdomain', 'wildcard'),
choices=('on', 'subdomain', 'wildcard'),
const='on', nargs='?')),
(['--user'],
dict(help="provide user for wordpress site")),

View File

@@ -1202,7 +1202,10 @@ def setupLetsEncrypt(self, wo_domain_name):
Log.warn(self, "Please wait while we fetch the new HTTPS certificate"
" for your site.\nIt may take a few minutes"
" depending on the network.")
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh --issue "
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
"--config-home "
"'/etc/letsencrypt/config' "
"--issue "
"-d {0} -d www.{0} -w /var/www/html "
"-k ec-384"
.format(wo_domain_name))
@@ -1221,12 +1224,14 @@ def setupLetsEncrypt(self, wo_domain_name):
ssl_deploy = WOShellExec.cmd_exec(self,
"mkdir -p {0}/{1} && "
"/etc/letsencrypt/acme.sh "
"--config-home "
"'/etc/letsencrypt/config'"
"--install-cert -d {1} --ecc "
"--cert-file {0}/{1}/cert.pem "
"--key-file {0}/{1}/key.pem "
"--fullchain-file "
"{0}/{1}/fullchain.pem "
"--reloadcmd="
"--reloadcmd "
"\"service nginx restart\" "
.format(WOVariables.wo_ssl_live,
wo_domain_name))
@@ -1275,7 +1280,10 @@ def setupLetsEncryptSubdomain(self, wo_domain_name):
Log.warn(self, "Please wait while we fetch the new HTTPS certificate "
"for your site.\nIt may take a "
"few minutes depending on the network.")
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh --issue "
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
"--config-home "
"'/etc/letsencrypt/config' "
"--issue "
"-d {0} -w /var/www/html "
"-k ec-384"
.format(wo_domain_name))
@@ -1324,7 +1332,7 @@ def setupLetsEncryptSubdomain(self, wo_domain_name):
def renewLetsEncrypt(self, wo_domain_name):
ssl = WOShellExec.cmd_exec(
self, "/etc/letsencrypt/acme.sh --renew -d {0} --ecc --force"
self, "/etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --renew -d {0} --ecc --force"
.format(wo_domain_name))
mail_list = ''
@@ -1429,12 +1437,14 @@ def archivedCertificateHandle(self, domain, wo_wp_email):
"few minutes depending on your network.")
ssl = WOShellExec.cmd_exec(self, "mkdir -p {0}/{1} && "
"/etc/letsencrypt/acme.sh "
"--config-home "
"'/etc/letsencrypt/config' "
"--install-cert -d {1} --ecc "
"--cert-file {0}/{1}/cert.pem "
"--key-file {0}/{1}/key.pem "
"--fullchain-file "
"{0}/{1}/fullchain.pem "
"--reloadcmd="
"--reloadcmd "
"\"service nginx restart\" "
.format(WOVariables.wo_ssl_live, domain))
@@ -1451,7 +1461,7 @@ def archivedCertificateHandle(self, domain, wo_wp_email):
Log.info(self, "Please wait while we renew the Let's Encrypt"
"certificate for your site.\nIt may take a few "
"minutes depending on your network.")
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh --renew -d {0} --ecc --force"
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --renew -d {0} --ecc --force"
.format(domain))
else:

View File

@@ -149,15 +149,13 @@ class WOStackController(CementBaseController):
Log.debug(self, 'Adding repository for Nginx')
WORepo.add_key(self, WOVariables.wo_nginx_key)
if (WOVariables.wo_platform_distro == 'ubuntu'):
if (set(WOVariables.wo_php73).issubset(set(apt_packages)) or
set(WOVariables.wo_php).issubset(set(apt_packages))):
if (set(WOVariables.wo_php73).issubset(set(apt_packages)) or
set(WOVariables.wo_php).issubset(set(apt_packages))):
if (WOVariables.wo_platform_distro == 'ubuntu'):
Log.info(self, "Adding repository for PHP, please wait...")
Log.debug(self, 'Adding ppa for PHP')
WORepo.add(self, ppa=WOVariables.wo_php_repo)
else:
if (set(WOVariables.wo_php73).issubset(set(apt_packages)) or
set(WOVariables.wo_php).issubset(set(apt_packages))):
else:
Log.info(self, "Adding repository for PHP, please wait...")
# Add repository for php
Log.debug(self, 'Adding repo_url of php for debian')
@@ -167,14 +165,11 @@ class WOStackController(CementBaseController):
if set(WOVariables.wo_redis).issubset(set(apt_packages)):
Log.info(self, "Adding repository for Redis, please wait...")
if WOVariables.wo_platform_distro == 'debian':
Log.debug(self, 'Adding repo_url of redis for debian')
WORepo.add(self, repo_url=WOVariables.wo_redis_repo)
Log.debug(self, 'Adding Deb.sury GPG key')
WORepo.add_key(self, 'AC0E47584A7A714D')
else:
if WOVariables.wo_platform_distro == 'ubuntu':
Log.debug(self, 'Adding ppa for redis')
WORepo.add(self, ppa=WOVariables.wo_redis_repo)
else:
Log.debug(self, 'Adding repo_url of redis for debian')
@expose(hide=True)
def post_pref(self, apt_packages, packages):