don't try to kill a process which does not exists anymore - this avoid
authorWolfram Schneider <wosch@indexdata.dk>
Mon, 11 May 2009 20:25:37 +0000 (20:25 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Mon, 11 May 2009 20:25:37 +0000 (20:25 +0000)
a silly error message

src/pazpar2.sh

index ab02cd6..84985ca 100755 (executable)
@@ -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