- # Install our configuration fragment and make Apache load it
- # (and unload any code from a previous version of Memories).
- # Check whether mod_perl is enabled first.
- for server in apache apache-perl apache-ssl; do
- if [ "$(apache-modconf $server query mod_perl 2>/dev/null)" \
- = "mod_perl" -a \
- \! -e /etc/$server/conf.d/memories ]; then
- ln -s ../../memories/apache.conf /etc/$server/conf.d/memories
- invoke-rc.d $server force-reload
+ # If mod_perl and mod_apreq are installed, ensure our configuration
+ # fragment is installed and make Apache (re)load the configuration
+ # and application.
+ if [ -e /etc/apache2/mods-enabled/perl.load -a \
+ -e /etc/apache2/mods-enabled/apreq.load -a \
+ -f /usr/share/perl5/Apache2/Upload.pm ]; then
+ if [ \! -e /etc/apache2/conf.d/memories ]; then
+ ln -s ../../memories/apache.conf /etc/apache2/conf.d/memories