diff --git a/ulib/.ulib_version b/ulib/.ulib_version index f64f5d8..9902f17 100644 --- a/ulib/.ulib_version +++ b/ulib/.ulib_version @@ -1 +1 @@ -27 +28 diff --git a/ulib/apache b/ulib/apache index aea884c..3b99bb5 100644 --- a/ulib/apache +++ b/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"