From 66676119122eb0e9ff008979e12872d60dd16c37 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Mon, 11 May 2009 20:25:37 +0000 Subject: [PATCH] don't try to kill a process which does not exists anymore - this avoid a silly error message --- src/pazpar2.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 1.7.10.4