From: Pieter Lexis Date: Thu, 15 Dec 2016 12:53:35 +0000 (+0100) Subject: Fix dnsdist initscript config check X-Git-Tag: dnsdist-1.1.0~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4772%2Fhead;p=thirdparty%2Fpdns.git Fix dnsdist initscript config check --- 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