diff --git a/inc/services.inc b/inc/services.inc index 6b296b54..d7bf6bcf 100755 --- a/inc/services.inc +++ b/inc/services.inc @@ -100,7 +100,7 @@ Server did not start serving DNS requests within 10mins you moron...." 1 # if [ -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ] || [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.secondary ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.singleserver.${1^^}.secondary)) -ge 300 ]; then [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.secondary ] && touch ${NM_TMPFOLDER}/.singleserver.${1^^}.secondary for stc in "${!servicestocheck}"; do - if [ systemctl is-active --quiet "${stc}" ]; then + if [ $(systemctl is-active --quiet ${stc}) ]; then [ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.socket pdnsadmin.service" /bin/systemctl stop ${stc} & >/dev/null 2>&1 fi