chmod the stats file

This commit is contained in:
f 2021-04-01 15:51:39 -03:00
parent dd0ae7325a
commit 0cc8e3064c

View file

@ -1,7 +1,13 @@
#!/bin/sh
set -e
STATS=${STATS:-/tmp/stats.yaml}
case $1 in
start) rm -f /tmp/prometheus.pid ; daemonize -c /tmp -p /tmp/prometheus.pid -l /tmp/prometheus.pid -u nobody /usr/bin/knot-prometheus-exporter ${STATS:-/tmp/stats.yaml} ;;
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}
;;
stop) cat /tmp/prometheus.pid | xargs -r kill ;;
esac