summaryrefslogtreecommitdiff
path: root/debian/mailgraph.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/mailgraph.postinst')
-rw-r--r--debian/mailgraph.postinst18
1 files changed, 14 insertions, 4 deletions
diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst
index 2bfa4db..6a6addf 100644
--- a/debian/mailgraph.postinst
+++ b/debian/mailgraph.postinst
@@ -25,9 +25,9 @@ case "$1" in
cp -p /usr/share/mailgraph/mailgraph.default ${TEMPFILE}
# Merge debconf values into the configuration
- for i in BOOT_START=start_on_boot MAIL_LOG=mail_log IGNORE_LOCALHOST=ignore_localhost; do
- db_get rkhunter/${i%=*}
- sed -i -re "s@^(${i#*=}=).*@\1\"${RET}\"@" "$TEMPFILE"
+ for foo in BOOT_START=start_on_boot MAIL_LOG=mail_log IGNORE_LOCALHOST=ignore_localhost; do
+ db_get mailgraph/${foo#*=}
+ sed -i -re "s@^(${foo%=*}=).*@\1\"${RET}\"@" "$TEMPFILE"
done
ucf --three-way --debconf-ok ${TEMPFILE} /etc/default/mailgraph
@@ -48,6 +48,16 @@ esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
-#DEBHELPER#
+# Automatically added by dh_installinit
+if [ -x "/etc/init.d/mailgraph" ]; then
+ update-rc.d mailgraph defaults >/dev/null
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d mailgraph start || exit $?
+ else
+ /etc/init.d/mailgraph start || exit $?
+ fi
+fi
+# End automatically added section
+
exit 0