* Quick factoring of postinst/preinst now that we have more than two
modules
* Depend on suphp/suexec
* Enable more required apache modules
Package: hcoop-apache2-config
Architecture: all
Package: hcoop-apache2-config
Architecture: all
-Depends: libapache2-mod-waklog, apache2-mpm-prefork, apache2.2-common, ${misc:Depends}
+Depends: libapache2-mod-waklog, apache2-mpm-prefork, apache2.2-common,
+ apache2-suexec-custom, libapache2-mod-suphp, ${misc:Depends}
Description: Configuration for HCoop/Domtool Apache
Configuration bits required for apache to operate as a user web node
controlled by domtool.
Description: Configuration for HCoop/Domtool Apache
Configuration bits required for apache to operate as a user web node
controlled by domtool.
# the debian-policy package
# the debian-policy package
+HCOOP_APACHE_MODULES="dav dav_fs dav_lock rewrite suexec suphp waklog"
+
# Redundantly enable on upgrades in case some new modules were
# enabled
# Redundantly enable on upgrades in case some new modules were
# enabled
- a2enmod -q waklog
- a2enmod -q dav
- a2enmod -q dav_fs
- a2enmod -q dav_lock
-
- if [ -e "/etc/apache2/mods-enabled/waklog.load" ] && \
- [ -e "/etc/apache2/mods-enabled/dav.load" ] && \
- [ -e "/etc/apache2/mods-enabled/dav_fs.load" ] && \
- [ -e "/etc/apache2/mods-enabled/dav_lock.load" ]; then
+ for mod in $HCOOP_APACHE_MODULES; do
+ a2enmod -q $mod
+ done
+
+ HCOOP_ENABLE_FAILED=0
+ for mod in $HCOOP_APACHE_MODULES; do
+ if [ ! -e "/etc/apache2/modules-enabled/${mod}.conf" ]; then
+ HCOOP_ENABLED_FAILED=1
+ fi
+ done
+
+ if [ ! $HCOOP_ENABLE_FAILED ]; then
invoke-rc.d apache2 restart
fi
;;
invoke-rc.d apache2 restart
fi
;;
# the debian-policy package
# the debian-policy package
+HCOOP_APACHE_MODULES="dav dav_fs dav_lock rewrite suexec suphp waklog"
+
case "$1" in
remove|purge)
case "$1" in
remove|purge)
- a2dismod -q -f waklog || true
- a2dismod -q -f dav || true
- a2dismod -q -f dav_fs || true
- a2dismod -q -f dav_lock || true
+ for mod in $HCOOP_APACHE_MODULES; do
+ a2dismod -q -f $mod || true
+ done
+
# invoke-rc.d apache2 restart
;;
# invoke-rc.d apache2 restart
;;