Fix disabling hsts
This commit is contained in:
@@ -370,7 +370,7 @@ class WOFileUtils():
|
|||||||
|
|
||||||
def enabledisable(self, path, enable=True):
|
def enabledisable(self, path, enable=True):
|
||||||
"""Switch conf from .conf.disabled to .conf or vice-versa"""
|
"""Switch conf from .conf.disabled to .conf or vice-versa"""
|
||||||
if enable:
|
if enable is True:
|
||||||
Log.debug(self, "Check if disabled file exist")
|
Log.debug(self, "Check if disabled file exist")
|
||||||
if os.path.exists('{0}.disabled'.format(path)):
|
if os.path.exists('{0}.disabled'.format(path)):
|
||||||
Log.debug(self, "Moving .disabled file")
|
Log.debug(self, "Moving .disabled file")
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ class SSL:
|
|||||||
|
|
||||||
def setuphsts(self, wo_domain_name, enable=True):
|
def setuphsts(self, wo_domain_name, enable=True):
|
||||||
"""Enable or disable htsts for a site"""
|
"""Enable or disable htsts for a site"""
|
||||||
if enable:
|
if enable is True:
|
||||||
if WOFileUtils.enabledisable(
|
if WOFileUtils.enabledisable(
|
||||||
self, '/var/www/{0}/conf/nginx/hsts.conf'
|
self, '/var/www/{0}/conf/nginx/hsts.conf'
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user