mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Fixed a2enmod
This commit is contained in:
parent
4c73db9aa1
commit
90f3b26bcf
1 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# An extremely simplified version of `a2enmod` for enabling modules in the
|
||||
# httpd docker image. First argument is the server_root and the second is the
|
||||
# httpd docker image. First argument is the ServerRoot and the second is the
|
||||
# module to be enabled.
|
||||
|
||||
confdir=$1
|
||||
|
|
@ -8,10 +8,11 @@ module=$2
|
|||
|
||||
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" ]
|
||||
availbase="/mods-available/${module}.conf"
|
||||
availconf=$confdir$availbase
|
||||
enabldir="$confdir/mods-enabled"
|
||||
enablconf="$enabldir/${module}.conf"
|
||||
if [ -e $availconf -a -d $enabldir -a ! -e $enablconf ]
|
||||
then
|
||||
ln -s "..$available_base" $enabled_conf
|
||||
ln -s "..$availbase" $enablconf
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue