5
# Required-Start: $syslog $network $remote_fs
6
# Required-Stop: $syslog $remote_fs
7
# Should-Start: $local_fs $named
8
# Should-Stop: $local_fs
9
# Default-Start: 2 3 4 5
11
# Short-Description: BIND graph
12
# Description: Create graphs from DNS activity
15
# initscript for bindgraph
16
# (C) 2006 Jose Luis Tallon <jltallon@adv-solutions.net>
17
# based upon <skeleton>, code by Ian Murdock and others
19
CONFIG=/etc/default/bindgraph
20
DNS_LOG=/var/log/bind9-query.log
24
DAEMON=/usr/sbin/bindgraph.pl
26
PIDFILE=/var/run/servergraph/bindgraph.pid
27
CACHEDIR=/var/cache/bindgraph
28
RRD_DIR=/var/lib/bindgraph
31
test -x $DAEMON || exit 0
33
if [ -f $CONFIG ]; then
37
# Just to be sure it is there...
38
pid_dir=`dirname $PIDFILE`
39
test -d $pid_dir || mkdir -p $pid_dir
40
chown daemon:root $pid_dir
43
. /lib/lsb/init-functions
45
if [ -n "$LOG_FORMAT" ]; then
46
FORMAT="--format=${LOG_FORMAT}"
51
log_daemon_msg "Starting $DESC" "$DAEMON"
52
if start-stop-daemon --start --quiet --exec $DAEMON -N 15 -c daemon:adm -- \
53
-l $DNS_LOG $FORMAT -d --daemon_rrd=$RRD_DIR --rrd_name=$RRD_NAME $ARGS ;
62
log_daemon_msg "Stopping $DESC: " "$DAEMON"
63
start-stop-daemon --stop --oknodo --pidfile $PIDFILE -c daemon:adm ;
76
if pidofproc -p $PIDFILE $DAEMON ; then
77
log_success_msg "$DAEMON is running"
80
log_success_msg "$DAEMON is not running"
86
log_success_msg "Usage: $0 start|stop|restart|force-reload"