config is in masqmail 0.2.30-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 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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | #!/bin/bash
set -e
# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0
# This conf script is capable of backing up
db_capb backup
# shamelessly copied from xserver-common.config.
# Thanks to Branden. :-)
CONFIGFILE=/etc/masqmail/masqmail.conf
ASK_TO_REPLACE=
if [ -e $CONFIGFILE ]; then
# does the file have debconf markers in it?
if egrep -q '^### BEGIN DEBCONF SECTION' $CONFIGFILE && \
egrep -q '^### END DEBCONF SECTION' $CONFIGFILE; then
PRIORITY=medium
else
ASK_TO_REPLACE=yes
PRIORITY=high
fi
else
PRIORITY=medium
# this is for the postinst, which tests this:
db_set masqmail/move_existing_nondebconf_config "true"
fi
# use debconf to manage configuration file?
db_input $PRIORITY masqmail/manage_config_with_debconf || true
db_go
db_get masqmail/manage_config_with_debconf
if [ "$RET" = "false" ]; then
exit 0
fi
# move existing configuration file out of
# the way?
if [ x"$ASK_TO_REPLACE" = x"yes" ]; then
db_input $PRIORITY masqmail/move_existing_nondebconf_config || true
db_go
db_get masqmail/move_existing_nondebconf_config || true
if [ "$RET" = "true" ]; then
mv $CONFIGFILE $CONFIGFILE.debconf-backup
else
exit 0
fi
fi
if [ -f /etc/mailname ] ; then
hostfqdn=`cat /etc/mailname`
elif [ `hostname -f 2>/dev/null` ] ; then
hostfqdn=`hostname -f`
fi
hostname=`hostname`
db_fget masqmail/host_name seen
if [ "$RET" = "false" ]; then
db_set masqmail/host_name ${hostfqdn}
fi
db_fget masqmail/local_hosts seen
if [ "$RET" = "false" ]; then
db_set masqmail/local_hosts "localhost;${hostname};${hostfqdn}"
fi
STATE=1
while [ "$STATE" != 0 -a "$STATE" != 19 ]; do
case "$STATE" in
1)
db_input medium masqmail/host_name || true
;;
2)
db_input medium masqmail/local_hosts || true
;;
3)
db_input medium masqmail/local_nets || true
;;
4)
db_input medium masqmail/listen_addresses || true
;;
5)
db_input low masqmail/use_syslog || true
;;
6)
db_input medium masqmail/online_detect || true
;;
7)
db_get masqmail/online_detect
if [ "$RET" = "file" ] ; then
db_input low masqmail/online_file || true
else
db_input medium masqmail/online_pipe || true
fi
;;
8)
db_input medium masqmail/mbox_default || true
;;
9)
db_get masqmail/mbox_default
if [ "$RET" = "mda" ] ; then
db_input medium masqmail/mda || true
else
db_input low masqmail/mda || true
fi
;;
10)
db_input low masqmail/alias_local_caseless || true
;;
11)
db_input low masqmail/init_smtp_daemon || true
;;
12)
db_input low masqmail/init_queue_daemon || true
;;
13)
db_get masqmail/init_queue_daemon
if [ "$RET" = "true" ] ; then
db_input low masqmail/queue_daemon_ival || true
fi
;;
14)
db_input medium masqmail/init_fetch_daemon || true
;;
15)
db_get masqmail/init_fetch_daemon
if [ "$RET" = "true" ] ; then
db_input low masqmail/fetch_daemon_ival || true
fi
;;
16)
db_input medium masqmail/ipup_runqueue || true
;;
17)
db_input medium masqmail/ipup_fetch || true
;;
18)
db_input medium masqmail/ifup_ifaces || true
;;
esac
if db_go; then
STATE=$(($STATE + 1))
else
STATE=$(($STATE - 1))
fi
done
# dpkg-reconfigure does not stop services:
# (cause of Bug#151528)
# in debhelper version < 1.2.9
DH_VERSION=`dpkg -l debconf | awk ' /^ii/ { print $3 }'`
if dpkg --compare-versions $DH_VERSION lt "1.2.9" ; then
if [ x"$1" = x"reconfigure" ] ; then
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d masqmail stop
else
if [ -x "/etc/init.d/masqmail" ]; then
/etc/init.d/masqmail stop || true
fi
fi
fi
fi
exit 0
|