Signed-off-by: Adam Spiers <aspi...@suse.com> --- examples/haproxy.init | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/examples/haproxy.init b/examples/haproxy.init index 67268eb..bf13b15 100644 --- a/examples/haproxy.init +++ b/examples/haproxy.init @@ -43,7 +43,7 @@ LOCKFILE=/var/lock/subsys/$BASENAME RETVAL=0 start() { - $BIN -c -q -f $CFG + quiet_check if [ $? -ne 0 ]; then echo "Errors found in configuration file, check it with '$BASENAME check'." return 1 @@ -68,7 +68,7 @@ stop() { } restart() { - $BIN -c -q -f $CFG + quiet_check if [ $? -ne 0 ]; then echo "Errors found in configuration file, check it with '$BASENAME check'." return 1 @@ -78,7 +78,7 @@ restart() { } reload() { - $BIN -c -q -f $CFG + quiet_check if [ $? -ne 0 ]; then echo "Errors found in configuration file, check it with '$BASENAME check'." return 1 @@ -90,6 +90,10 @@ check() { $BIN -c -q -V -f $CFG } +quiet_check() + $BIN -c -q -f $CFG +} + rhstatus() { status $BASENAME } -- 2.1.2.330.g565301e