preinst is in libapache2-mod-spamhaus 0.7-1.1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #! /bin/sh
set -e
# We have to tell a2dismod about the removal before moving the conffile.
if ([ "$1" = install ] || [ "$1" = "upgrade" ]) && [ "$2" ] && \
dpkg --compare-versions "$2" le-nl 0.7-1.1~; then
if [ ! -h /etc/apache2/mods-enabled/mod-spamhaus.load ]; then
touch /etc/apache2/mods-enabled/mod-spamhaus.load.dpkg-was-disabled
fi
a2dismod -p -m -f -q mod-spamhaus
fi
dpkg-maintscript-helper mv_conffile /etc/apache2/mods-available/mod-spamhaus.conf /etc/apache2/mods-available/spamhaus.conf 0.7-1.1~ -- "$@"
dpkg-maintscript-helper mv_conffile /etc/apache2/mods-available/mod-spamhaus.load /etc/apache2/mods-available/spamhaus.load 0.7-1.1~ -- "$@"
exit 0
|