summaryrefslogtreecommitdiff
path: root/debian/mailgraph.postinst
diff options
context:
space:
mode:
authorJulien Valroff <julien@kirya.net>2010-09-04 14:07:55 +0200
committerJulien Valroff <julien@kirya.net>2010-09-04 14:07:55 +0200
commitc5740eb67fa4fbb23f2a3daf38832f3348f7de63 (patch)
tree77115019e8b3881899f840897f47b7bd5f08d236 /debian/mailgraph.postinst
parentfd8f9a9aac032539390bf22d063bcb68d32390f0 (diff)
ship a default file in the package
Diffstat (limited to 'debian/mailgraph.postinst')
-rw-r--r--debian/mailgraph.postinst33
1 files changed, 5 insertions, 28 deletions
diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst
index 31088e0..2464098 100644
--- a/debian/mailgraph.postinst
+++ b/debian/mailgraph.postinst
@@ -30,35 +30,12 @@ case "$1" in
db_get mailgraph/ignore_localhost
IGNORE_LOCALHOST=$RET
- TEMPFILE=`tempfile -m 644`
- cat << EOF > $TEMPFILE
-# This file is sourced by /etc/init.d/mailgraph
-#
-# This is a POSIX shell fragment
-#
-
-# Should Mailgraph start on boot (true|false) (default: true)
-BOOT_START=$BOOT_START
-
-# Logfile used by mailgraph (default: /var/log/mail.log)
-MAIL_LOG=$MAIL_LOG
-
-# Ignore mails from localhost (true|false) (default: false)
-# When true, this will pass --ignore-localhost to mailgraph daemon
-IGNORE_LOCALHOST=$IGNORE_LOCALHOST
-
-# Extra options to be passed to mailgraph daemon
-# See mailgraph -h output (default: "")
-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
-EOF
+ TEMPFILE=`tempfile`
+ cp -p /usr/share/mailgraph/mailgraph.default ${TEMPFILE}
- ucf $TEMPFILE /etc/default/mailgraph --debconf-ok
- rm -f $TEMPFILE
+ ucf --three-way --debconf-ok ${TEMPFILE} /etc/default/mailgraph
+ ucfr mailgraph /etc/default/mailgraph
+ rm -f ${TEMPFILE}
;;