]> git.decadent.org.uk Git - memories.git/blob - debian/memories.postinst
Stop ignoring errors in maintainer scripts
[memories.git] / debian / memories.postinst
1 #!/bin/sh -e
2
3 #DEBHELPER#
4
5 if [ "x$1" = xconfigure ]; then
6
7     # If mod_perl and mod_apreq are installed, ensure our configuration
8     # fragment is installed and make Apache (re)load the configuration
9     # and application.
10     if [ -e /etc/apache2/mods-enabled/perl.load -a \
11          -e /etc/apache2/mods-enabled/apreq.load -a \
12          -f /usr/share/perl5/Apache2/Upload.pm ]; then
13         if [ \! -e /etc/apache2/conf.d/memories ]; then
14             ln -s ../../memories/apache.conf /etc/apache2/conf.d/memories
15         fi
16         invoke-rc.d apache2 force-reload
17     fi
18
19     # Disable integration with now-unsupported Apache 1.x.
20     for server in apache apache-perl apache-ssl; do
21         if [ -L /etc/$server/conf.d/memories ]; then
22             rm /etc/$server/conf.d/memories
23             if [ -f /etc/init.d/$server ]; then
24                  invoke-rc.d $server force-reload
25             fi
26         fi
27     done
28
29 fi