Imported Debian patch 4.84-8
[hcoop/debian/exim4.git] / debian / exim4-daemon-light.postinst
1 #!/bin/sh
2
3 set -e
4
5 . /usr/share/debconf/confmodule
6
7 if [ -n "$EX4DEBUG" ]; then
8 echo "now debugging $0 $@"
9 set -x
10 fi
11
12 dc_eximconfig_configtype="other"
13 db_get exim4/dc_eximconfig_configtype || true
14 if [ "$RET" = "no configuration at this time" ]; then
15 dc_eximconfig_configtype="none"
16 fi
17
18 case "$1" in
19 configure)
20
21 # || true is needed for succesfull installation with configtype 'none'
22 if [ -x /etc/init.d/exim4 ]; then
23 db_stop
24 if [ "$dc_eximconfig_configtype" = "none" ]; then
25 # we may have broken config here, ignore errors
26 invoke-rc.d exim4 start || true
27 else
28 # we must have working config here, honor errors
29 invoke-rc.d exim4 start
30 fi
31 fi
32 ;;
33 esac
34
35 #DEBHELPER#