mod_tile: automatically enable mod_tile in apache on first install of debian package

Brings postinst script in line with the template for apache modules on the debian wiki
This commit is contained in:
Kai Krueger
2011-07-16 23:35:12 +00:00
parent cd0b3c8efe
commit 16847267a5
2 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,17 @@
mkdir -p /var/lib/mod_tile mkdir -p /var/lib/mod_tile
chown www-data:www-data /var/lib/mod_tile chown www-data:www-data /var/lib/mod_tile
if [ "$1" = configure ] ; then
# only enable on new installs, not on upgrades
if [ -z "$2" ] ; then
a2enmod tile
fi
# only restart if mod_something is enabled
if [ -e /etc/apache2/mods-enabled/tile.load ] ; then
invoke-rc.d apache2 restart
fi
fi
# automatically install munin plugins if munin is present. # automatically install munin plugins if munin is present.
if [ -d /etc/munin/plugins ] if [ -d /etc/munin/plugins ]
then then

View File

@ -1,5 +1,10 @@
#!/bin/sh #!/bin/sh
if [ "$1" = remove ] ; then
a2dismod -q -f tile || true
invoke-rc.d apache2 restart
fi
# automatically remove munin plugins # automatically remove munin plugins
if [ -d /etc/munin/plugins ] if [ -d /etc/munin/plugins ]
then then