From 33f1c301924cc6b5c022bf8c9113b04290d2da0a Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 22 Sep 2015 16:49:07 -0700 Subject: [PATCH] Updated a2enmod.sh --- .../configurators/apache/a2enmod.sh | 34 +++++-------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh index f822a1f7b..0a8ade4c2 100755 --- a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh +++ b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh @@ -3,31 +3,15 @@ # httpd docker image. First argument is the server_root and the second is the # module to be enabled. -APACHE_CONFDIR=$1 +confdir=$1 +module=$2 -enable () { - echo "LoadModule "$1"_module /usr/local/apache2/modules/mod_"$1".so" >> \ - $APACHE_CONFDIR"/test.conf" - available_base="/mods-available/"$1".conf" - available_conf=$APACHE_CONFDIR$available_base - enabled_dir=$APACHE_CONFDIR"/mods-enabled" - enabled_conf=$enabled_dir"/"$1".conf" - if [ -e "$available_conf" -a -d "$enabled_dir" -a ! -e "$enabled_conf" ] - then - ln -s "..$available_base" $enabled_conf - fi -} - -if [ $2 == "ssl" ] +echo "LoadModule ${module}_module " \ + "/usr/local/apache2/modules/mod_${module}.so" >> "${confdir}/test.conf" +available_conf=$APACHE_CONFDIR"/mods-available/${module}.conf" +enabled_dir=$APACHE_CONFDIR"/mods-enabled" +enabled_conf=$enabled_dir"/"$1".conf" +if [ -e "$available_conf" -a -d "$enabled_dir" -a ! -e "$enabled_conf" ] then - # Enables ssl and all its dependencies - enable "setenvif" - enable "mime" - enable "socache_shmcb" - enable "ssl" -elif [ $2 == "rewrite" ] -then - enable "rewrite" -else - exit 1 + ln -s "..$available_base" $enabled_conf fi