run exporter as knot user
knot recreates the file on every dump
This commit is contained in:
parent
0cc8e3064c
commit
71be4a90b4
1 changed files with 1 additions and 2 deletions
|
@ -6,8 +6,7 @@ STATS=${STATS:-/tmp/stats.yaml}
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
rm -f /tmp/prometheus.pid
|
rm -f /tmp/prometheus.pid
|
||||||
chmod 644 ${STATS}
|
daemonize -c /tmp -p /tmp/prometheus.pid -l /tmp/prometheus.pid -u knot /usr/bin/knot-prometheus-exporter ${STATS}
|
||||||
daemonize -c /tmp -p /tmp/prometheus.pid -l /tmp/prometheus.pid -u nobody /usr/bin/knot-prometheus-exporter ${STATS}
|
|
||||||
;;
|
;;
|
||||||
stop) cat /tmp/prometheus.pid | xargs -r kill ;;
|
stop) cat /tmp/prometheus.pid | xargs -r kill ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue