#! /bin/sh
### BEGIN INIT INFO
# Provides: gnt-monitor
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
+# Required-Start: $remote_fs $syslog $ganeti
+# Required-Stop: $remote_fs $syslog $ganeti
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="Genti monitor to influxdb"
+DESC="Genti monitor"
NAME=gnt-monitor
DAEMON=/etc/ganeti/$NAME
-DAEMON_ARGS="--options args"
+DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+export DEBUG
+export INFLUX
+export INTERVAL
+export DC
+export RACK
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# 2 if daemon could not be started
#start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
# || return 1
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background -- \
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready