18 lines
301 B
Bash
18 lines
301 B
Bash
|
#!/bin/sh
|
||
|
set -e
|
||
|
|
||
|
pid=/tmp/prometheus.pid
|
||
|
|
||
|
case $1 in
|
||
|
start)
|
||
|
rm -f ${pid}
|
||
|
daemonize -c /tmp -p ${pid} -l ${pid} -u nobody \
|
||
|
/usr/bin/nginx-prometheus-exporter -nginx.scrape-uri http://127.0.0.1:8080/stub_status
|
||
|
|
||
|
;;
|
||
|
stop)
|
||
|
cat /tmp/prometheus.pid | xargs -r kill
|
||
|
|
||
|
;;
|
||
|
esac
|