Ver Fonte

- fixed bug in config file checks (the check failed if ser -c produced
a waring, such as "unable to resolve..." (ported from stable)
- LD_LIBRARY_PATH set to /usr/lib/ser/

Jan Janak há 19 anos atrás
pai
commit
6dbef6f3dc
1 ficheiros alterados com 5 adições e 2 exclusões
  1. 5 2
      debian/ser.init

+ 5 - 2
debian/ser.init

@@ -19,9 +19,11 @@ NAME=ser
 DESC=ser
 DESC=ser
 PIDFILE=/var/run/$NAME/$NAME.pid
 PIDFILE=/var/run/$NAME/$NAME.pid
 PARAMS="-P $PIDFILE -u ser -g ser"
 PARAMS="-P $PIDFILE -u ser -g ser"
+LD_LIBRARY_PATH=/usr/lib/ser
 
 
 test -f $DAEMON || exit 0
 test -f $DAEMON || exit 0
 
 
+export LD_LIBRARY_PATH
 set -e
 set -e
 
 
 case "$1" in
 case "$1" in
@@ -56,8 +58,9 @@ case "$1" in
 	#	just the same as "restart".
 	#	just the same as "restart".
 	#
 	#
 	# Check if ser configuration is valid before restarting the server
 	# 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 "\nThere are errors in the configuration file. Please fix them first"
 	    echo -e "\n$out\n"
 	    echo -e "\n$out\n"
 	    exit 0
 	    exit 0