35 lines
832 B
Bash
35 lines
832 B
Bash
#!/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
|
|
db_stop
|
|
|
|
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || \
|
|
[ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
|
if ! [ -d /run/systemd/system ] && [ -x /etc/init.d/exim4 ]; then
|
|
# SysV Init
|
|
# || true is needed for succesfull installation with configtype 'none'
|
|
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
|
|
fi
|
|
|
|
|
|
#DEBHELPER#
|