This commit is contained in:
VirtuBox
2019-04-15 23:54:05 +02:00
parent eef613359e
commit 4e577919e3

View File

@@ -785,7 +785,7 @@ class WOSiteUpdateController(CementBaseController):
action='store' or 'store_const', action='store' or 'store_const',
choices=('on', 'off', 'renew', 'subdomain', 'wildcard'), choices=('on', 'off', 'renew', 'subdomain', 'wildcard'),
const='on', nargs='?')), const='on', nargs='?')),
(['-hsts'], (['--hsts'],
dict(help="configure hsts for the site", dict(help="configure hsts for the site",
action='store' or 'store_const', action='store' or 'store_const',
choices=('on', 'off'), choices=('on', 'off'),
@@ -1337,8 +1337,8 @@ class WOSiteUpdateController(CementBaseController):
if data['hsts'] is True: if data['hsts'] is True:
if os.path.isfile(("{0}/conf/nginx/ssl.conf") if os.path.isfile(("{0}/conf/nginx/ssl.conf")
.format(wo_site_webroot)): .format(wo_site_webroot)):
if (not os.path.isfile("{0}/conf/nginx/hsts.conf" if not os.path.isfile("{0}/conf/nginx/hsts.conf"
.format(wo_site_webroot))): .format(wo_site_webroot)):
setupHsts(self, wo_domain) setupHsts(self, wo_domain)
else: else:
Log.error(self, "HSTS is already configured for given " Log.error(self, "HSTS is already configured for given "