mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 19:22:16 +02:00
Updated a2enmod.sh
This commit is contained in:
+9
-25
@@ -3,31 +3,15 @@
|
|||||||
# httpd docker image. First argument is the server_root and the second is the
|
# httpd docker image. First argument is the server_root and the second is the
|
||||||
# module to be enabled.
|
# module to be enabled.
|
||||||
|
|
||||||
APACHE_CONFDIR=$1
|
confdir=$1
|
||||||
|
module=$2
|
||||||
|
|
||||||
enable () {
|
echo "LoadModule ${module}_module " \
|
||||||
echo "LoadModule "$1"_module /usr/local/apache2/modules/mod_"$1".so" >> \
|
"/usr/local/apache2/modules/mod_${module}.so" >> "${confdir}/test.conf"
|
||||||
$APACHE_CONFDIR"/test.conf"
|
available_conf=$APACHE_CONFDIR"/mods-available/${module}.conf"
|
||||||
available_base="/mods-available/"$1".conf"
|
enabled_dir=$APACHE_CONFDIR"/mods-enabled"
|
||||||
available_conf=$APACHE_CONFDIR$available_base
|
enabled_conf=$enabled_dir"/"$1".conf"
|
||||||
enabled_dir=$APACHE_CONFDIR"/mods-enabled"
|
if [ -e "$available_conf" -a -d "$enabled_dir" -a ! -e "$enabled_conf" ]
|
||||||
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" ]
|
|
||||||
then
|
then
|
||||||
# Enables ssl and all its dependencies
|
ln -s "..$available_base" $enabled_conf
|
||||||
enable "setenvif"
|
|
||||||
enable "mime"
|
|
||||||
enable "socache_shmcb"
|
|
||||||
enable "ssl"
|
|
||||||
elif [ $2 == "rewrite" ]
|
|
||||||
then
|
|
||||||
enable "rewrite"
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user