postinst is in fiaif 1.23.1-4.
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 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
# init config
db_get fiaif/enable_initd
if [ "$RET" = true ]; then
update-rc.d fiaif start 41 S . stop 88 0 6 . > /dev/null 2>&1
fi
if [ "$RET" = false ]; then
#disable init.d calls.
update-rc.d -f fiaif remove >/dev/null
fi
# Make sure that old state does not exist
[ -f /var/state/fiaif/iptables ] && rm -f /var/state/fiaif/iptables
# Make all configuration files only readable to root
for f in `find /etc/fiaif -type f`; do
if [ -x $f ]; then
chmod 0700 $f
else
chmod 0600 $f
fi
done
for d in `find /etc/fiaif -type d`; do
chmod 700 /etc/fiaif
done
# display usage warning
db_get fiaif/warning
# display cron question
F=/etc/cron.daily/fiaif-scan
db_get fiaif/enable_cron
if [ "x$RET" = "xtrue" ]; then
if [ ! -f $F ]; then
install -p -m 0755 /usr/share/fiaif/fiaif-scan $F
fi
else
if [ -f $F ]; then
rm -f $F
fi
fi
# stop db to reset screen
db_stop
# remove old fiaif-update cron job
if [ -e /etc/cron.daily/fiaif ]; then
rm -f /etc/cron.daily/fiaif
fi
#clean-up postinst error
foo="/etc/init.d/fiaif exists"
if test -f /1; then
if grep -q "$foo" /1; then
rm -f /1
fi
fi
|