From: Wolfram Schneider Date: Mon, 11 May 2009 20:25:37 +0000 (+0000) Subject: don't try to kill a process which does not exists anymore - this avoid X-Git-Tag: v1.1.0~17 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=66676119122eb0e9ff008979e12872d60dd16c37;p=pazpar2-moved-to-github.git don't try to kill a process which does not exists anymore - this avoid a silly error message --- diff --git a/src/pazpar2.sh b/src/pazpar2.sh index ab02cd6..84985ca 100755 --- a/src/pazpar2.sh +++ b/src/pazpar2.sh @@ -16,7 +16,9 @@ case "$command" in ;; stop) - test -f $pazpar2_pid && kill `cat $pazpar2_pid` + test -f $pazpar2_pid && \ + kill -0 `cat $pazpar2_pid` 2>/dev/null && \ + kill -TERM `cat $pazpar2_pid` ;; # graceful restart - not yet implemented by pazpar2