mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-08-08 08:24:25 +00:00
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:
11
debian/libapache2-mod-tile.postinst
vendored
11
debian/libapache2-mod-tile.postinst
vendored
@ -3,6 +3,17 @@
|
||||
mkdir -p /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.
|
||||
if [ -d /etc/munin/plugins ]
|
||||
then
|
||||
|
5
debian/libapache2-mod-tile.prerm
vendored
5
debian/libapache2-mod-tile.prerm
vendored
@ -1,5 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = remove ] ; then
|
||||
a2dismod -q -f tile || true
|
||||
invoke-rc.d apache2 restart
|
||||
fi
|
||||
|
||||
# automatically remove munin plugins
|
||||
if [ -d /etc/munin/plugins ]
|
||||
then
|
||||
|
Reference in New Issue
Block a user