|
@@ -56,8 +56,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
|