postinst is in argus-server 1:2.0.6.fixes.1-16.3.
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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | #!/bin/bash
set -e
. /usr/share/debconf/confmodule
OK=0
CONFIG=/etc/default/argus-server
PATH=/bin:/sbin:/usr/bin:/usr/sbin
PIDFILE=/var/run/argus.pid
VALIDVALUES="both none dialup boot"
db_get argus/startup || true
DEBSTARTUP=$RET
db_get argus/overwrite_conffile || true
OVERWRITE=$RET
db_stop
if [ ! -f "$CONFIG" -a "$OVERWRITE" = "no" ]; then
. $CONFIG
fi
for i in $VALIDVALUES; do
if [ "$i" = "$STARTUP" ]; then
OK=1
fi
done
if [ $OK != 1 ]; then
STARTUP=$DEBSTARTUP
fi
PPP_INTERFACES=`ifconfig -a | awk '{print $1}' | grep ppp || true`
case "$1" in
install)
;;
upgrade)
if [ -f $PIDFILE ] && [ -n `ps ax | grep ^\`cat $PIDFILE\` | grep argus` ]; then
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d argus-server stop /dev/null 2>/dev/null || true
else
/etc/init.d/argus-server stop /dev/null 2>/dev/null || true
fi
elif [ "$STARTUP" = "dialup" ] || [ "$STARTUP" = "both" ]; then
for i in $PPP_INTERFACES; do
echo -n "Stopping network auditing daemon on $i: "
test -f /var/run/argus.${i} && \
PPP_IFACE=$i /etc/ppp/ip-down.d/argus-server > /dev/null 2>&1 || true
echo "argus."
done
fi
;;
configure)
# Remove old /etc/logrotate.d/argus file left after 2.0.6.rc3-2
if [ -e /etc/logrotate.d/argus ] && [ -e /etc/logrotate.d/argus-server ]; then
rm -f /etc/logrotate.d/argus
fi
update-rc.d argus-server defaults 20 > /dev/null
if [ "$STARTUP" = "none" ]; then
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d argus-server stop /dev/null 2>/dev/null || true
else
/etc/init.d/argus-server stop /dev/null 2>/dev/null || true
fi
for i in $PPP_INTERFACES; do
echo -n "Stopping network auditing daemon on $i: "
PPP_IFACE=$i /etc/ppp/ip-down.d/argus-server > /dev/null 2>&1|| true
echo "argus."
done
fi
if [ "$STARTUP" = "dialup" ]; then
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d argus-server stop 2>/dev/null || true
else
/etc/init.d/argus-server stop 2>/dev/null || true
fi
fi
if [ "$STARTUP" = "boot" ]; then
for i in $PPP_INTERFACES; do
echo -n "Stopping network auditing daemon on $i: "
PPP_IFACE=$i /etc/ppp/ip-down.d/argus-server > /dev/null 2>&1 || true
echo "argus."
done
fi
if [ ! -f "$CONFIG" -o "$OVERWRITE" = "true" ]; then
cat << __EOF__ > $CONFIG
# This file is automatically generated.
# Use dpkg-reconfigure argus-server to modify the settings
STARTUP=$STARTUP
__EOF__
fi
;;
*)
#
# Unknown action - do nothing.
#
exit 0
;;
esac
if [ "$STARTUP" = "dialup" ] || [ "$STARTUP" = "both" ]; then
for i in $PPP_INTERFACES; do
echo -n "Starting network auditing daemon on $i: "
PPP_IFACE=$i /etc/ppp/ip-up.d/argus-server > /dev/null 2>&1 || true
echo "argus."
done
fi
if [ "$STARTUP" = "boot" ] || [ "$STARTUP" = "both" ]; then
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d argus-server start 2>/dev/null || true
else
/etc/init.d/argus-server start 2>/dev/null || true
fi
fi
exit 0
|