From 71be4a90b4b82e38242667827193b7e8aca0d8e7 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 1 Apr 2021 17:29:38 -0300 Subject: [PATCH] run exporter as knot user knot recreates the file on every dump --- prometheusd.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/prometheusd.sh b/prometheusd.sh index 1db6f03..47712fc 100755 --- a/prometheusd.sh +++ b/prometheusd.sh @@ -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