From 1fc6a0efafa895145891bb2c281cc5cf2cd15851 Mon Sep 17 00:00:00 2001 From: netjester Date: Thu, 29 Dec 2016 17:47:11 +0000 Subject: [PATCH] Fix #0004826 Fixes #0004826: ./unrealircd stop always says unrealircd.pid: No such file https://bugs.unrealircd.org/view.php?id=4826 --- unrealircd.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unrealircd.in b/unrealircd.in index b76c5c4c5..400c52e1c 100644 --- a/unrealircd.in +++ b/unrealircd.in @@ -63,7 +63,9 @@ elif [ "$1" = "stop" ] ; then exit 1 fi sleep 1 - kill -9 `cat $PID_FILE` 1>/dev/null 2>&1 + if [ -r $PID_FILE ] ; then + kill -9 `cat $PID_FILE` 1>/dev/null 2>&1 + fi elif [ "$1" = "rehash" ] ; then echo "Rehashing UnrealIRCd" if [ ! -r $PID_FILE ] ; then