]> git.decadent.org.uk Git - memories.git/blob - debian/memories.postinst
1d9ef95c2d1852065ace17d2eb2e45b7df8c52e8
[memories.git] / debian / memories.postinst
1 #!/bin/sh
2
3 #DEBHELPER#
4
5 if [ "x$1" = xconfigure ]; then
6
7     # Install our configuration fragment and make Apache load it
8     # (and unload any code from a previous version of Memories).
9     # Check whether mod_perl is enabled first.
10     for server in apache apache-perl apache-ssl; do
11         if [ "$(apache-modconf $server query mod_perl 2>/dev/null)" \
12                  = "mod_perl" -a \
13              \! -e /etc/$server/conf.d/memories ]; then
14             ln -s ../../memories/apache.conf /etc/$server/conf.d/memories
15             invoke-rc.d $server force-reload
16         fi
17     done
18
19     # Disable currently broken integration with Apache 2
20     if [ -L /etc/apache2/conf.d/memories ]; then
21         rm /etc/apache2/conf.d/memories
22         invoke-rc.d apache2 force-reload
23     fi
24
25 fi