From a117da4a3f6f08932d41891f9f4d5d89a489b34e Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Fri, 13 Aug 2010 09:08:32 +0200 Subject: Rename dh files to mailgraph.* --- debian/config | 21 -------------- debian/default | 23 ---------------- debian/dirs | 3 -- debian/docs | 2 -- debian/examples | 1 - debian/init | 68 ---------------------------------------------- debian/install | 3 -- debian/mailgraph.config | 21 ++++++++++++++ debian/mailgraph.default | 23 ++++++++++++++++ debian/mailgraph.dirs | 3 ++ debian/mailgraph.docs | 2 ++ debian/mailgraph.examples | 1 + debian/mailgraph.init | 68 ++++++++++++++++++++++++++++++++++++++++++++++ debian/mailgraph.install | 3 ++ debian/mailgraph.manpages | 1 + debian/mailgraph.postinst | 63 ++++++++++++++++++++++++++++++++++++++++++ debian/mailgraph.preinst | 39 ++++++++++++++++++++++++++ debian/mailgraph.templates | 23 ++++++++++++++++ debian/manpages | 1 - debian/postinst | 63 ------------------------------------------ debian/preinst | 39 -------------------------- debian/templates | 23 ---------------- 22 files changed, 247 insertions(+), 247 deletions(-) delete mode 100644 debian/config delete mode 100644 debian/default delete mode 100644 debian/dirs delete mode 100644 debian/docs delete mode 100644 debian/examples delete mode 100644 debian/init delete mode 100644 debian/install create mode 100644 debian/mailgraph.config create mode 100644 debian/mailgraph.default create mode 100644 debian/mailgraph.dirs create mode 100644 debian/mailgraph.docs create mode 100644 debian/mailgraph.examples create mode 100644 debian/mailgraph.init create mode 100644 debian/mailgraph.install create mode 100644 debian/mailgraph.manpages create mode 100644 debian/mailgraph.postinst create mode 100644 debian/mailgraph.preinst create mode 100644 debian/mailgraph.templates delete mode 100644 debian/manpages delete mode 100644 debian/postinst delete mode 100644 debian/preinst delete mode 100644 debian/templates (limited to 'debian') diff --git a/debian/config b/debian/config deleted file mode 100644 index 81a5977..0000000 --- a/debian/config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -db_title "mailgraph" || true - -if [ -r /etc/default/mailgraph ]; then - . /etc/default/mailgraph - db_set mailgraph/start_on_boot "$BOOT_START" - db_set mailgraph/mail_log "$MAIL_LOG" - db_set mailgraph/ignore_localhost "$IGNORE_LOCALHOST" -fi - -db_input medium mailgraph/start_on_boot || true -db_go -db_input medium mailgraph/mail_log || true -db_go -db_input medium mailgraph/ignore_localhost || true -db_go diff --git a/debian/default b/debian/default deleted file mode 100644 index fa77519..0000000 --- a/debian/default +++ /dev/null @@ -1,23 +0,0 @@ -# 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=true - -# Logfile used by mailgraph (default: /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=true - -# 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 diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 5af1b35..0000000 --- a/debian/dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/sbin -usr/lib/cgi-bin -var/lib/mailgraph diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 95f19c1..0000000 --- a/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ -README -debian/README.fetchmail diff --git a/debian/examples b/debian/examples deleted file mode 100644 index 1c07734..0000000 --- a/debian/examples +++ /dev/null @@ -1 +0,0 @@ -debian/lighttpd.conf diff --git a/debian/init b/debian/init deleted file mode 100644 index f1d0c26..0000000 --- a/debian/init +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -### BEGIN INIT INFO -# Provides: mailgraph -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Mail statistics frontend for Postfix -### END INIT INFO - -MAILGRAPH_CONFIG="/etc/default/mailgraph" -NAME="mailgraph" -DAEMON="/usr/sbin/mailgraph" -PID_FILE="/var/run/mailgraph.pid" -RRD_DIR="/var/lib/mailgraph" - -# Default values -BOOT_START=true -MAIL_LOG=/var/log/mail.log -IGNORE_LOCALHOST=false -EXTRA_OPTIONS="" -HTTP_USER=www-data -HTTP_GROUP=www-data - -[ -r $MAILGRAPH_CONFIG ] && . $MAILGRAPH_CONFIG -[ -x $DAEMON ] || exit 0 - -[ "$BOOT_START" = "true" ] || exit 0 -[ "$IGNORE_LOCALHOST" = "true" ] && IGNORE_OPTION="--ignore-localhost" - -. /lib/lsb/init-functions - -case "$1" in - start) - # Check that the data directory is writable by the user running - # the HTTP daemon - if [ -d $RRD_DIR ]; then - chown $HTTP_USER:$HTTP_GROUP $RRD_DIR - chmod 755 $RRD_DIR - fi - - log_begin_msg "Starting $DESC:" "$NAME" - if [ -f $PID_FILE ]; then - log_action_cont_msg " already running" - log_end_msg 1 - else - start-stop-daemon --start --quiet --background --pidfile $PID_FILE --exec $DAEMON -- \ - --logfile $MAIL_LOG --daemon --daemon_pid=$PID_FILE \ - --daemon_rrd=$RRD_DIR $IGNORE_OPTION $EXTRA_OPTIONS - log_end_msg $? - fi - ;; - stop) - log_begin_msg "Stopping $DESC:" "$NAME" - start-stop-daemon --stop --pidfile $PID_FILE - rm -f $PID_FILE - log_end_msg $? - ;; - restart|force-reload) - $0 stop - $0 start - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 3 - ;; -esac diff --git a/debian/install b/debian/install deleted file mode 100644 index c504c20..0000000 --- a/debian/install +++ /dev/null @@ -1,3 +0,0 @@ -mailgraph usr/sbin/ -mailgraph.cgi usr/lib/cgi-bin/ -mailgraph.css usr/lib/cgi-bin/ diff --git a/debian/mailgraph.config b/debian/mailgraph.config new file mode 100644 index 0000000..81a5977 --- /dev/null +++ b/debian/mailgraph.config @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_title "mailgraph" || true + +if [ -r /etc/default/mailgraph ]; then + . /etc/default/mailgraph + db_set mailgraph/start_on_boot "$BOOT_START" + db_set mailgraph/mail_log "$MAIL_LOG" + db_set mailgraph/ignore_localhost "$IGNORE_LOCALHOST" +fi + +db_input medium mailgraph/start_on_boot || true +db_go +db_input medium mailgraph/mail_log || true +db_go +db_input medium mailgraph/ignore_localhost || true +db_go diff --git a/debian/mailgraph.default b/debian/mailgraph.default new file mode 100644 index 0000000..fa77519 --- /dev/null +++ b/debian/mailgraph.default @@ -0,0 +1,23 @@ +# 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=true + +# Logfile used by mailgraph (default: /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=true + +# 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 diff --git a/debian/mailgraph.dirs b/debian/mailgraph.dirs new file mode 100644 index 0000000..5af1b35 --- /dev/null +++ b/debian/mailgraph.dirs @@ -0,0 +1,3 @@ +usr/sbin +usr/lib/cgi-bin +var/lib/mailgraph diff --git a/debian/mailgraph.docs b/debian/mailgraph.docs new file mode 100644 index 0000000..95f19c1 --- /dev/null +++ b/debian/mailgraph.docs @@ -0,0 +1,2 @@ +README +debian/README.fetchmail diff --git a/debian/mailgraph.examples b/debian/mailgraph.examples new file mode 100644 index 0000000..1c07734 --- /dev/null +++ b/debian/mailgraph.examples @@ -0,0 +1 @@ +debian/lighttpd.conf diff --git a/debian/mailgraph.init b/debian/mailgraph.init new file mode 100644 index 0000000..f1d0c26 --- /dev/null +++ b/debian/mailgraph.init @@ -0,0 +1,68 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: mailgraph +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Mail statistics frontend for Postfix +### END INIT INFO + +MAILGRAPH_CONFIG="/etc/default/mailgraph" +NAME="mailgraph" +DAEMON="/usr/sbin/mailgraph" +PID_FILE="/var/run/mailgraph.pid" +RRD_DIR="/var/lib/mailgraph" + +# Default values +BOOT_START=true +MAIL_LOG=/var/log/mail.log +IGNORE_LOCALHOST=false +EXTRA_OPTIONS="" +HTTP_USER=www-data +HTTP_GROUP=www-data + +[ -r $MAILGRAPH_CONFIG ] && . $MAILGRAPH_CONFIG +[ -x $DAEMON ] || exit 0 + +[ "$BOOT_START" = "true" ] || exit 0 +[ "$IGNORE_LOCALHOST" = "true" ] && IGNORE_OPTION="--ignore-localhost" + +. /lib/lsb/init-functions + +case "$1" in + start) + # Check that the data directory is writable by the user running + # the HTTP daemon + if [ -d $RRD_DIR ]; then + chown $HTTP_USER:$HTTP_GROUP $RRD_DIR + chmod 755 $RRD_DIR + fi + + log_begin_msg "Starting $DESC:" "$NAME" + if [ -f $PID_FILE ]; then + log_action_cont_msg " already running" + log_end_msg 1 + else + start-stop-daemon --start --quiet --background --pidfile $PID_FILE --exec $DAEMON -- \ + --logfile $MAIL_LOG --daemon --daemon_pid=$PID_FILE \ + --daemon_rrd=$RRD_DIR $IGNORE_OPTION $EXTRA_OPTIONS + log_end_msg $? + fi + ;; + stop) + log_begin_msg "Stopping $DESC:" "$NAME" + start-stop-daemon --stop --pidfile $PID_FILE + rm -f $PID_FILE + log_end_msg $? + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/mailgraph.install b/debian/mailgraph.install new file mode 100644 index 0000000..c504c20 --- /dev/null +++ b/debian/mailgraph.install @@ -0,0 +1,3 @@ +mailgraph usr/sbin/ +mailgraph.cgi usr/lib/cgi-bin/ +mailgraph.css usr/lib/cgi-bin/ diff --git a/debian/mailgraph.manpages b/debian/mailgraph.manpages new file mode 100644 index 0000000..ab624e5 --- /dev/null +++ b/debian/mailgraph.manpages @@ -0,0 +1 @@ +debian/mailgraph.8 diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst new file mode 100644 index 0000000..4dea08d --- /dev/null +++ b/debian/mailgraph.postinst @@ -0,0 +1,63 @@ +#! /bin/sh +# postinst script for mailgraph +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +. /usr/share/debconf/confmodule +DF=/etc/default/mailgraph + +case "$1" in + configure) + + db_get mailgraph/start_on_boot || true + BOOT_START=$RET + + db_get mailgraph/mail_log || true + MAIL_LOG=$RET + + db_get mailgraph/ignore_localhost + IGNORE_LOCALHOST=$RET + + if [ -w $DF ]; then + TEMPFILE=`mktemp` || exit 1 + sed $DF -e "s,^ *BOOT_START=.*,BOOT_START=$BOOT_START," \ + -e "s,^ *MAIL_LOG=.*,MAIL_LOG=$MAIL_LOG," \ + -e "s,^ *IGNORE_LOCALHOST=.*,IGNORE_LOCALHOST=$IGNORE_LOCALHOST," \ + > $TEMPFILE + mv -f $TEMPFILE $DF + chmod 644 $DF + fi + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/debian/mailgraph.preinst b/debian/mailgraph.preinst new file mode 100644 index 0000000..729ecc5 --- /dev/null +++ b/debian/mailgraph.preinst @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' + + +case "$1" in + upgrade) + if [ "$2" \< "1.13-1.1" ]; then + if [ -r /etc/default/mailgraph ]; then + . /usr/share/debconf/confmodule + . /etc/default/mailgraph + db_set mailgraph/start_on_boot "$BOOT_START" + db_set mailgraph/mail_log "$MAIL_LOG" + db_set mailgraph/ignore_localhost "$IGNORE_LOCALHOST" + fi + fi + ;; + + install|abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/mailgraph.templates b/debian/mailgraph.templates new file mode 100644 index 0000000..8d3c68e --- /dev/null +++ b/debian/mailgraph.templates @@ -0,0 +1,23 @@ +Template: mailgraph/start_on_boot +Type: boolean +Default: true +_Description: Should Mailgraph start on boot? + Mailgraph can start on boot time as a daemon. Then it will monitor + your Postfix logfile for changes. This is recommended. + . + The other method is to call mailgraph by hand with the -c parameter. + +Template: mailgraph/mail_log +Type: string +Default: /var/log/mail.log +_Description: Logfile used by mailgraph: + Enter the logfile which should be used to create the databases for + mailgraph. If unsure, leave default (/var/log/mail.log). + +Template: mailgraph/ignore_localhost +Type: boolean +Default: false +_Description: Ignore mail to/from localhost? + When using a content filter like amavis, incoming mail is counted more + than once, which will result in wrong values. + If you use some content filter, you should choose this option. diff --git a/debian/manpages b/debian/manpages deleted file mode 100644 index ab624e5..0000000 --- a/debian/manpages +++ /dev/null @@ -1 +0,0 @@ -debian/mailgraph.8 diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index 4dea08d..0000000 --- a/debian/postinst +++ /dev/null @@ -1,63 +0,0 @@ -#! /bin/sh -# postinst script for mailgraph -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# - -. /usr/share/debconf/confmodule -DF=/etc/default/mailgraph - -case "$1" in - configure) - - db_get mailgraph/start_on_boot || true - BOOT_START=$RET - - db_get mailgraph/mail_log || true - MAIL_LOG=$RET - - db_get mailgraph/ignore_localhost - IGNORE_LOCALHOST=$RET - - if [ -w $DF ]; then - TEMPFILE=`mktemp` || exit 1 - sed $DF -e "s,^ *BOOT_START=.*,BOOT_START=$BOOT_START," \ - -e "s,^ *MAIL_LOG=.*,MAIL_LOG=$MAIL_LOG," \ - -e "s,^ *IGNORE_LOCALHOST=.*,IGNORE_LOCALHOST=$IGNORE_LOCALHOST," \ - > $TEMPFILE - mv -f $TEMPFILE $DF - chmod 644 $DF - fi - - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - diff --git a/debian/preinst b/debian/preinst deleted file mode 100644 index 729ecc5..0000000 --- a/debian/preinst +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' - - -case "$1" in - upgrade) - if [ "$2" \< "1.13-1.1" ]; then - if [ -r /etc/default/mailgraph ]; then - . /usr/share/debconf/confmodule - . /etc/default/mailgraph - db_set mailgraph/start_on_boot "$BOOT_START" - db_set mailgraph/mail_log "$MAIL_LOG" - db_set mailgraph/ignore_localhost "$IGNORE_LOCALHOST" - fi - fi - ;; - - install|abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/templates b/debian/templates deleted file mode 100644 index 8d3c68e..0000000 --- a/debian/templates +++ /dev/null @@ -1,23 +0,0 @@ -Template: mailgraph/start_on_boot -Type: boolean -Default: true -_Description: Should Mailgraph start on boot? - Mailgraph can start on boot time as a daemon. Then it will monitor - your Postfix logfile for changes. This is recommended. - . - The other method is to call mailgraph by hand with the -c parameter. - -Template: mailgraph/mail_log -Type: string -Default: /var/log/mail.log -_Description: Logfile used by mailgraph: - Enter the logfile which should be used to create the databases for - mailgraph. If unsure, leave default (/var/log/mail.log). - -Template: mailgraph/ignore_localhost -Type: boolean -Default: false -_Description: Ignore mail to/from localhost? - When using a content filter like amavis, incoming mail is counted more - than once, which will result in wrong values. - If you use some content filter, you should choose this option. -- cgit v1.2.3