From ad2078df37a0d56cbc20bf10e69e5a9310465c69 Mon Sep 17 00:00:00 2001 From: James Kasten Date: Fri, 21 Nov 2014 01:36:42 -0800 Subject: [PATCH] Forgot to make options-ssl.conf part of the required setup... added code to check and copy it down to the appropriate place to aid developers working on the project, this will eventually go in the setup files --- letsencrypt/client/apache_configurator.py | 7 ++++++- letsencrypt/client/setup.sh | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/letsencrypt/client/apache_configurator.py b/letsencrypt/client/apache_configurator.py index 873d44f30..905f4c009 100644 --- a/letsencrypt/client/apache_configurator.py +++ b/letsencrypt/client/apache_configurator.py @@ -935,8 +935,9 @@ LogLevel warn \n\ subprocess.check_call(["sudo", "a2enmod", mod_name], stdout=open("/dev/null", 'w'), stderr=open("/dev/null", 'w')) # Hopefully this waits for output subprocess.check_call(["sudo", "/etc/init.d/apache2", "restart"], stdout=open("/dev/null", 'w'), stderr=open("/dev/null", 'w')) - except: + except Exception as e: logger.error("Error enabling mod_" + mod_name) + logger.error("Exception: %s" % str(e)) sys.exit(1) def fnmatch_to_re(self, cleanFNmatch): @@ -1177,6 +1178,10 @@ DocumentRoot " + CONFIG_DIR + "challenge_page/ \n \ result: Apache config includes virtual servers for issued challenges """ + # Check to make sure options-ssl.conf is installed + if not os.path.isfile(OPTIONS_SSL_CONF): + shutil.copyfile("letsencrypt/client/%s" % os.path.basename(OPTIONS_SSL_CONF), OPTIONS_SSL_CONF) + # TODO: Use ip address of existing vhost instead of relying on FQDN configText = " \n" for idx, lis in enumerate(listlistAddrs): diff --git a/letsencrypt/client/setup.sh b/letsencrypt/client/setup.sh index 237ffbf78..fb35eb4f7 100755 --- a/letsencrypt/client/setup.sh +++ b/letsencrypt/client/setup.sh @@ -1,3 +1,2 @@ #!/usr/bin/sh -cp ca_offerings /etc/trustify/.ca_offerings -cp options-ssl.conf /etc/trustify/options-ssl.conf +cp options-ssl.conf /etc/letsencrypt/options-ssl.conf