summaryrefslogtreecommitdiffstats
path: root/debian/exim4-daemon-light.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/exim4-daemon-light.postinst')
-rw-r--r--debian/exim4-daemon-light.postinst36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/exim4-daemon-light.postinst b/debian/exim4-daemon-light.postinst
new file mode 100644
index 0000000..50131a0
--- /dev/null
+++ b/debian/exim4-daemon-light.postinst
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$EX4DEBUG" ]; then
+ echo "now debugging $0 $@"
+ set -x
+fi
+
+dc_eximconfig_configtype="other"
+db_get exim4/dc_eximconfig_configtype || true
+if [ "$RET" = "no configuration at this time" ]; then
+ dc_eximconfig_configtype="none"
+fi
+
+case "$1" in
+ configure)
+
+ # || true is needed for succesfull installation with configtype 'none'
+ if [ -x /etc/init.d/exim4 ]; then
+ db_stop
+ if [ "$dc_eximconfig_configtype" = "none" ]; then
+ # we may have broken config here, ignore errors
+ invoke-rc.d exim4 start || true
+ else
+ # we must have working config here, honor errors
+ invoke-rc.d exim4 start
+ fi
+ fi
+
+ ;;
+esac
+
+#DEBHELPER#