diff --git a/prometheusd.sh b/prometheusd.sh index 91e11b1..5e6331e 100755 --- a/prometheusd.sh +++ b/prometheusd.sh @@ -6,11 +6,11 @@ pid=/tmp/prometheus.pid case $1 in start) - test -f $tmp && echo "prometheus-exporter already running" - daemonize -c /tmp -p $tmp -l $tmp -u knot /usr/bin/knot-prometheus-exporter ${STATS} + test -f $pid && echo "prometheus-exporter already running" + daemonize -c /tmp -p $pid -l $pid -u knot /usr/bin/knot-prometheus-exporter ${STATS} ;; stop) - test -f $tmp && cat $tmp | xargs -r kill - rm -f $tmp + test -f $pid && cat $pid | xargs -r kill + rm -f $pid ;; esac