diff --git a/Changes b/Changes index a5b1acf74..0335629c4 100644 --- a/Changes +++ b/Changes @@ -1809,3 +1809,5 @@ MOTDs a ./Config option. Default is commandsandmodules. Any takers? - Changed logging into not open/close constantly, #0002943. This may leaks fds and cause problems, so its a heads up +- Some minor changes to unreal.in, to fix unreal stop, start, and + restart a bit. diff --git a/unreal.in b/unreal.in index 7e91eacd8..30b6e0e0d 100644 --- a/unreal.in +++ b/unreal.in @@ -34,7 +34,7 @@ elif [ "$1" = "stop" ] ; then exit 1 fi PID=`cat $PID_FILE` - if [ "`ps -p $PID | wc -l`" == "0" ]; then + if [ "`ps -p $PID | wc -l`" = "1" ]; then echo "UnrealIRCd is not running" rm -f $PID_FILE # Kill stale PID. exit 1 @@ -54,7 +54,7 @@ elif [ "$1" = "rehash" ] ; then exit 1 fi PID=`cat $PID_FILE` - if [ "`ps -p $PID | wc -l`" == "0" ]; then + if [ "`ps -p $PID | wc -l`" = "1" ]; then echo "UnrealIRCd is not running" rm -f $PID_FILE # Kill stale PID. exit 1 @@ -74,7 +74,7 @@ elif [ "$1" = "restart" ] ; then exit 1 fi PID=`cat $PID_FILE` - if [ "`ps -p $PID | wc -l`" == "0" ]; then + if [ "`ps -p $PID | wc -l`" = "1" ]; then echo "UnrealIRCd is not running - Starting." rm -f $PID_FILE # Kill stale PID. exec $0 start