correctly remove prometheus temp/lock file

This commit is contained in:
f 2022-07-09 23:21:11 -03:00
parent b47c31e546
commit c7615afb9a

View file

@ -18,8 +18,6 @@ case $1 in
;;
prometheus)
rm -f /tmp/prometheus.pid
daemonize -c /srv \
-p /tmp/prometheus.pid \
-l /tmp/prometheus.pid \
@ -28,7 +26,8 @@ case $1 in
;;
prometheus-stop)
cat /tmp/prometheus.pid | xargs -r kill
test ! -f /tmp/prometheus.pid || cat /tmp/prometheus.pid | xargs -r kill
rm -f /tmp/prometheus.pid
;;