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.default | 11 +++++------ debian/mailgraph.postinst | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/debian/mailgraph.default b/debian/mailgraph.default index f302084..72d4649 100644 --- a/debian/mailgraph.default +++ b/debian/mailgraph.default @@ -4,14 +4,14 @@ # # Should Mailgraph start on boot (true|false) (default: true) -BOOT_START=true +BOOT_START="true" # Logfile used by mailgraph (default: /var/log/mail.log) -MAIL_LOG=/var/log/mail.log +MAIL_LOG="/var/log/mail.log" # Ignore mails from localhost (true|false) (default: false) # When true, this will pass --ignore-localhost to mailgraph daemon -IGNORE_LOCALHOST=false +IGNORE_LOCALHOST="false" # Extra options to be passed to mailgraph daemon # See mailgraph -h output (default: "") @@ -19,6 +19,5 @@ EXTRA_OPTIONS="" # User and group http daemon runs as (default: www-data for both options) # Restart mailgraph daemon so that these values are taken into account -HTTP_USER=www-data -HTTP_GROUP=www-data - +HTTP_USER="www-data" +HTTP_GROUP="www-data" 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