Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoona Hoikkala <joona@kuori.org>2015-12-07 13:46:56 +0300
committerJoona Hoikkala <joona@kuori.org>2015-12-07 13:46:56 +0300
commit43473827802a2756dadcce2ce15228db5e876c48 (patch)
treece846761c8fa3f8c38c96e0406121c1169c746b9 /letsencrypt-apache
parentb02a881c6e07ae289564be4dc94b976e629504e4 (diff)
Moved enable_site check to correct place
Diffstat (limited to 'letsencrypt-apache')
-rw-r--r--letsencrypt-apache/letsencrypt_apache/configurator.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/letsencrypt-apache/letsencrypt_apache/configurator.py b/letsencrypt-apache/letsencrypt_apache/configurator.py
index 30be653a1..c4ec3c2e7 100644
--- a/letsencrypt-apache/letsencrypt_apache/configurator.py
+++ b/letsencrypt-apache/letsencrypt_apache/configurator.py
@@ -245,9 +245,10 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
if chain_path is not None:
self.save_notes += "\tSSLCertificateChainFile %s\n" % chain_path
- # Make sure vhost is enabled
- if not vhost.enabled:
- self.enable_site(vhost)
+ # Make sure vhost is enabled if distro with enabled / available
+ if constants.os_constant("handle_sites"):
+ if not vhost.enabled:
+ self.enable_site(vhost)
def choose_vhost(self, target_name, temp=False):
"""Chooses a virtual host based on the given domain name.
@@ -1088,9 +1089,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
:rtype: bool
"""
- # Always return true for distros without enabled / available
- 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):
try: