瀏覽代碼

- fixed config file checking upon restart

Jan Janak 19 年之前
父節點
當前提交
d805717b71
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      debian/ser.init

+ 3 - 2
debian/ser.init

@@ -56,8 +56,9 @@ case "$1" in
 	#	just the same as "restart".
 	#
 	# Check if ser configuration is valid before restarting the server
-	out=`($DAEMON -c >/dev/null || true) 2>&1`
-	if [ "$out" != 'config file ok, exiting...' ]; then
+        (($DAEMON -c 2>&1) | grep "config file ok, exiting") > /dev/null
+	if [ $? -ne 0 ]; then
+            ($DAEMON -c 2>&1)
 	    echo -e "\nThere are errors in the configuration file. Please fix them first"
 	    echo -e "\n$out\n"
 	    exit 0