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
|
#!/bin/sh
CONFIGFILE=/etc/default/postsrsd
set -e
. /usr/share/debconf/confmodule
if [ -e $CONFIGFILE ]; then
. $CONFIGFILE || true
db_set postsrsd/domain "$SRS_DOMAIN"
priority="medium"
else
# only set the default value if the current value is empty, especially
# important since we can get called twice before the postinst writes
# the config file.
db_get postsrsd/domain
DOMAIN="$RET"
if [ -z "$DOMAIN" -a -e /usr/sbin/postconf ]; then
db_set postsrsd/domain "$(postconf -h mydomain)"
priority="medium"
elif [ -z "$DOMAIN" ]; then
db_set postsrsd/domain "$(hostname -d)"
priority="high"
fi
fi
db_input $priority postsrsd/domain || true
db_go
|