Commit 600ededc authored by Martín Ferrari's avatar Martín Ferrari

debian/init: always export DATA_SOURCE_NAME and use --inherit in daemon call.

parent 0d0824aa
......@@ -22,16 +22,19 @@ PIDFILE=/var/run/prometheus/prometheus-mysqld-exporter.pid
LOGFILE=/var/log/prometheus/prometheus-mysqld-exporter.log
ARGS=""
DATA_SOURCE_NAME=""
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
HELPER=/usr/bin/daemon
HELPER_ARGS="--name=$NAME --output=$LOGFILE --pidfile=$PIDFILE --user=$USER"
HELPER_ARGS="--name=$NAME --output=$LOGFILE --pidfile=$PIDFILE --user=$USER
--inherit"
do_start_prepare()
{
mkdir -p `dirname $PIDFILE` || true
chown $USER: `dirname $LOGFILE`
chown $USER: `dirname $PIDFILE`
export DATA_SOURCE_NAME
}
do_start_cmd()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment