--- /dev/null
+#!/bin/sh
+
+if [ "x$1" = xconfigure ]; then
+
+ # 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
+ fi
+ done
+ # Module configuration is different in the apache2 package.
+ if [ -e /etc/apache2/mods-enabled/perl.load -a \
+ \! -e /etc/apache2/conf.d/memories ]; then
+ ln -s ../../memories/apache.conf /etc/apache2/conf.d/memories
+ invoke-rc.d apache2 force-reload
+ fi
+
+fi
--- /dev/null
+#!/bin/sh
+
+if [ "x$1" = xremove -o "x$1" = xpurge ]; then
+ # Flush out our configuration fragment and loaded code from Apache.
+ for server in apache apache-perl apache-ssl apache2; do
+ if [ -L /etc/$server/conf.d/memories ]; then
+ rm /etc/$server/conf.d/memories
+ invoke-rc.d $server force-reload
+ fi
+ done
+fi
cp -dR templates debian/memories/etc/memories/
ln -s /etc/memories/Config.pm debian/memories/usr/share/perl5/Memories/
install debian/apache.conf debian/memories/etc/memories/
- install -d debian/memories/etc/apache/conf.d
- ln -s ../../memories/apache.conf debian/memories/etc/apache/conf.d/memories
install -d debian/memories/usr/share/memories
install memories.sql tag_dates debian/memories/usr/share/memories/
install -d debian/memories/var/lib/memories