rrda

REST API allowing to perform DNS queries over HTTP
Log | Files | Refs | README | LICENSE

commit dd3c7c81c498011cac341b6ddd800c88d09ae77d
parent 5eb3d67059515a468aae6d9215fc9ea92e91c15c
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Wed, 26 Mar 2014 21:02:33 +0100

Adding init script for Debian

Diffstat:
Adebian/rrda | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+), 0 deletions(-)

diff --git a/debian/rrda b/debian/rrda @@ -0,0 +1,59 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: rrda +# Required-Start: $all +# Required-Stop: $all +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: starts the rrda server +# Description: starts rrda using start-stop-daemon +### END INIT INFO + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +HOST=127.0.0.1 +PORT=8080 + +DAEMON=rrda +DAEMON_OPTS="-host=$HOST -port=$PORT" +PIDFILE=/var/run/rrda.pid +NAME=rrda + +USER=nobody +GROUP=nogroup + +test -f $DAEMON || exit 0 + +set -e + +case "$1" in + start) + echo -n "Starting rrda server: " + start-stop-daemon --start --chuid $USER:$GROUP \ + --make-pidfile --background --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + + stop) + echo -n "Stopping rrda server: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON + rm -f $PIDFILE + echo "$NAME." + ;; + + restart) + echo -n "Restarting rrda server:\n" + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "Usage: $NAME {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0+ \ No newline at end of file