run exporter as knot user

knot recreates the file on every dump
This commit is contained in:
f 2021-04-01 17:29:38 -03:00
parent 0cc8e3064c
commit 71be4a90b4

View file

@ -6,8 +6,7 @@ STATS=${STATS:-/tmp/stats.yaml}
case $1 in
start)
rm -f /tmp/prometheus.pid
chmod 644 ${STATS}
daemonize -c /tmp -p /tmp/prometheus.pid -l /tmp/prometheus.pid -u nobody /usr/bin/knot-prometheus-exporter ${STATS}
daemonize -c /tmp -p /tmp/prometheus.pid -l /tmp/prometheus.pid -u knot /usr/bin/knot-prometheus-exporter ${STATS}
;;
stop) cat /tmp/prometheus.pid | xargs -r kill ;;
esac