From d906efbb1aacfebd9931d49028f6240a667bae14 Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Mon, 4 Jan 2010 19:39:20 +0100 Subject: Imported Upstream version 1.14 --- mailgraph-init | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 mailgraph-init (limited to 'mailgraph-init') diff --git a/mailgraph-init b/mailgraph-init new file mode 100644 index 0000000..22b8357 --- /dev/null +++ b/mailgraph-init @@ -0,0 +1,42 @@ +#!/bin/sh + +# $Id: mailgraph-init 19 2005-06-13 11:23:22Z dws $ +# example init script for mailgraph +# +# chkconfig: 2345 82 28 +# description: mailgraph postfix log grapher. +# +# processname: mailgraph.pl +# pidfile: /var/run/mailgraph.pid + + +PATH=/bin:/usr/bin +MAILGRAPH_PL=/usr/local/bin/mailgraph.pl +MAIL_LOG=/var/log/syslog +PID_FILE=/var/run/mailgraph.pid +RRD_DIR=/var/lib + +case "$1" in +'start') + echo "Starting mail statistics grapher: mailgraph"; + nice -19 $MAILGRAPH_PL -l $MAIL_LOG -d \ + --daemon-pid=$PID_FILE --daemon-rrd=$RRD_DIR + ;; + +'stop') + echo "Stopping mail statistics grapher: mailgraph"; + if [ -f $PID_FILE ]; then + kill `cat $PID_FILE` + rm $PID_FILE + else + echo "mailgraph not running"; + fi + ;; + +*) + echo "Usage: $0 { start | stop }" + exit 1 + ;; + +esac +exit 0 -- cgit v1.2.3