prometheus: start/stop correctly
This commit is contained in:
parent
45ca6a926b
commit
f5abb9f427
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue