From 00b59e72421f0921f4a8501e43c1c1ae3a4cb5d5 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 31 Dec 2022 18:16:30 -0300 Subject: [PATCH] fix: don't fail to stop when process isn't running --- prometheusd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prometheusd.sh b/prometheusd.sh index 3be2e8d..9194742 100755 --- a/prometheusd.sh +++ b/prometheusd.sh @@ -10,7 +10,7 @@ case $1 in daemonize -c /tmp -p $pid -l $pid -u knot /usr/local/bin/syslogize /usr/bin/knot-prometheus-exporter ${STATS} ;; stop) - test -f $pid && cat $pid | xargs -r kill + test -f $pid && cat $pid | xargs -r kill || true rm -f $pid ;; esac