Fix wo site info

This commit is contained in:
VirtuBox
2019-08-30 08:51:43 +02:00
parent 56bc72489a
commit 7f0463602d

View File

@@ -137,7 +137,7 @@ class WOSiteController(CementBaseController):
Log.error(self, 'could not input site name') Log.error(self, 'could not input site name')
pargs.site_name = pargs.site_name.strip() pargs.site_name = pargs.site_name.strip()
(wo_domain, wo_www_domain) = ValidateDomain(pargs.site_name) (wo_domain, wo_www_domain) = ValidateDomain(pargs.site_name)
wo_domain_type, wo_root_domain = GetDomainlevel(wo_domain) (wo_domain_type, wo_root_domain) = GetDomainlevel(wo_domain)
wo_db_name = '' wo_db_name = ''
wo_db_user = '' wo_db_user = ''
wo_db_pass = '' wo_db_pass = ''
@@ -162,7 +162,12 @@ class WOSiteController(CementBaseController):
ssl = ("enabled" if siteinfo.is_ssl else "disabled") ssl = ("enabled" if siteinfo.is_ssl else "disabled")
if (ssl == "enabled"): if (ssl == "enabled"):
sslprovider = "Lets Encrypt" sslprovider = "Lets Encrypt"
sslexpiry = str(SSL.getExpirationDate(self, wo_domain)) if os.path.islink("{0}/conf/nginx/ssl.conf"
.format(wo_site_webroot)):
sslexpiry = str(
SSL.getExpirationDate(self, wo_root_domain))
else:
sslexpiry = str(SSL.getExpirationDate(self, wo_domain))
else: else:
sslprovider = '' sslprovider = ''
sslexpiry = '' sslexpiry = ''
@@ -1271,14 +1276,15 @@ class WOSiteUpdateController(CementBaseController):
wo_subdomain = False wo_subdomain = False
wo_wildcard = False wo_wildcard = False
if letsencrypt is check_ssl: if not wo_subdomain:
if letsencrypt is False: if letsencrypt is check_ssl:
Log.error(self, "SSl is not configured for given " if letsencrypt is False:
"site") Log.error(self, "SSl is not configured for given "
elif letsencrypt is True: "site")
Log.error(self, "SSl is already configured for given " elif letsencrypt is True:
"site") Log.error(self, "SSl is already configured for given "
pargs.letsencrypt = False "site")
pargs.letsencrypt = False
if data and (not pargs.php73): if data and (not pargs.php73):
if old_php73 is True: if old_php73 is True: