Prilagodba za Debian lenny, paket verzije 2.5.11-1~cn1.
[libapache-mod-security.git] / debian / libapache-mod-security.postinst
1 #!/bin/sh -e
2 # copied from libapache2-mod-php4
3
4 reload_apache()
5 {
6         if apache2ctl configtest 2>/dev/null; then
7                 invoke-rc.d apache2 force-reload || true
8         else
9                 echo "Your apache2 configuration is broken, so we're not restarting it for you."
10         fi
11 }
12
13 if [ -n "$2" ]; then
14 # we're upgrading. test if we're enabled, and if so, restart to reload the module.
15         if [ -e /etc/apache2/mods-enabled/mod-security.load ]; then
16                 reload_apache
17         fi
18         exit 0
19 fi
20
21 if [ -e /etc/apache2/apache2.conf ]; then
22 # Enable the module, but hide a2enmod's misleading message about apachectl
23 # and force-reload the thing ourselves.
24         a2enmod mod-security >/dev/null || true
25         a2enmod unique_id >/dev/null || true
26         reload_apache
27 fi
28
29 #DEBHELPER#
30
31 exit 0