From 8bc40b8c5f165ed83b1d3856fb5d6bd322bdee43 Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Sat, 4 Sep 2010 14:21:17 +0200 Subject: Fix typos and errors --- debian/mailgraph.postinst | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'debian/mailgraph.postinst') 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 -- cgit v1.2.3