Constant value per OS basis if installer should handle enabling / disabling sites

This commit is contained in:
Joona Hoikkala
2015-12-07 12:42:40 +02:00
parent 9e0bcf9f3c
commit b02a881c6e
2 changed files with 3 additions and 1 deletions
@@ -1089,7 +1089,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
"""
# Always return true for distros without enabled / available
if self.conf("enmod") == None:
if not constants.os_constant("handle_sites"):
return True
enabled_dir = os.path.join(self.parser.root, "sites-enabled")
for entry in os.listdir(enabled_dir):
@@ -11,6 +11,7 @@ CLI_DEFAULTS_DEBIAN = dict(
dismod="a2dismod",
le_vhost_ext="-le-ssl.conf",
handle_mods=True,
handle_sites=True,
challenge_location="/etc/apache2"
)
CLI_DEFAULTS_CENTOS = dict(
@@ -21,6 +22,7 @@ CLI_DEFAULTS_CENTOS = dict(
dismod=None,
le_vhost_ext="-le-ssl.conf",
handle_mods=False,
handle_sites=False,
challenge_location="/etc/httpd/conf.d"
)
CLI_DEFAULTS = {