From 37943b704c92ce4bd061732722c01f4962508fa9 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Thu, 15 Dec 2016 13:53:35 +0100 Subject: [PATCH] Fix dnsdist initscript config check --- pdns/dnsdistdist/contrib/dnsdist.init.centos6 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdistdist/contrib/dnsdist.init.centos6 b/pdns/dnsdistdist/contrib/dnsdist.init.centos6 index 33b4f903c1..e1ebae20ab 100644 --- a/pdns/dnsdistdist/contrib/dnsdist.init.centos6 +++ b/pdns/dnsdistdist/contrib/dnsdist.init.centos6 @@ -38,11 +38,13 @@ do_check() { echo "${msg}" >&2 return 1 fi + return 0 } do_start() { echo -n "Starting ${PROG}..." - if [ do_check -ne 0 ]; then + do_check + if [ $? -ne 0 ]; then return 1 fi daemon --pidfile=${PIDFILE} $DNSDIST -u ${DNSDIST_USER} -g ${DNSDIST_GROUP} -d -p ${PIDFILE} ${DNSDIST_OPTIONS} @@ -76,7 +78,8 @@ case "$1" in ret=$? if [ ${ret} -eq 0 ]; then - if [ do_check -ne 0 ]; then + do_check + if [ $? -ne 0 ]; then exit 1 # Don't stop when there's an error fi do_stop -- 2.47.2