From f5abb9f427dda2ec50501cc0848de3fafdcaf1fd Mon Sep 17 00:00:00 2001 From: f Date: Sat, 10 Sep 2022 15:54:46 -0300 Subject: [PATCH] prometheus: start/stop correctly --- prometheusd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prometheusd.sh b/prometheusd.sh index b288038..a549041 100755 --- a/prometheusd.sh +++ b/prometheusd.sh @@ -5,13 +5,13 @@ pid=/tmp/prometheus.pid case $1 in start) - rm -f ${pid} daemonize -c /tmp -p ${pid} -l ${pid} -u nobody \ + /usr/local/bin/syslogize \ /usr/bin/nginx-prometheus-exporter -nginx.scrape-uri http://127.0.0.1:8080/stub_status ;; stop) - cat /tmp/prometheus.pid | xargs -r kill - + test ! -f ${pid} || cat ${pid} | xargs -r kill + rm -f ${pid} ;; esac