apache_autoconf honore le fichier sites.conf
This commit is contained in:
parent
c3b66b5c5c
commit
15c562217f
|
@ -1 +1 @@
|
|||
27
|
||||
28
|
||||
|
|
26
ulib/apache
26
ulib/apache
|
@ -634,10 +634,26 @@ s#@@ca@@#$APACHESSLCERTSDIR/$(basename "$ca")#g
|
|||
done
|
||||
fi
|
||||
if [ -f "$confdir/sites.conf" ]; then
|
||||
#enablesites=()
|
||||
#disablesites=()
|
||||
# refaire enablesites et disablesites
|
||||
: #XXX activer les sites
|
||||
local -a sitesconfs; local sitesconf
|
||||
array_from_lines sitesconfs "$(<"$confdir/sites.conf" filter_conf)"
|
||||
if [ ${#sitesconfs[*]} -gt 0 ]; then
|
||||
# si une configuration existe, ignorer la configuration
|
||||
# automatique
|
||||
enablesites=()
|
||||
disablesites=()
|
||||
for sitesconf in "${sitesconfs[@]}"; do
|
||||
if [ "${sitesconf#+}" != "$sitesconf" ]; then
|
||||
array_del disablesites "${sitesconf#+}"
|
||||
array_add enablesites "${sitesconf#+}"
|
||||
elif [ "${sitesconf#-}" != "$sitesconf" ]; then
|
||||
array_del enablesites "${sitesconf#-}"
|
||||
array_add disablesites "${sitesconf#-}"
|
||||
else
|
||||
array_del disablesites "$sitesconf"
|
||||
array_add enablesites "$sitesconf"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
eend
|
||||
fi
|
||||
|
@ -653,7 +669,7 @@ s#@@ca@@#$APACHESSLCERTSDIR/$(basename "$ca")#g
|
|||
fi
|
||||
|
||||
if [ -n "${enablesites[*]}" -o -n "${disablesites[*]}" ]; then
|
||||
etitle "Activation des sites"
|
||||
etitle "(dés)Activation des sites"
|
||||
local site
|
||||
for site in "${enablesites[@]}"; do
|
||||
a2ensite "$site"
|
||||
|
|
Loading…
Reference in New Issue