Merge pull request #2501 from pi-hole/fix/restart-dns-error-on-success

Fix restartDNS returning code 1 even when it worked
pull/2514/head
Dan Schaper 6 years ago committed by GitHub
commit 35e53ab9c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -134,9 +134,11 @@ restartDNS() {
if [[ "${status}" -eq 0 ]]; then
[[ -t 1 ]] && echo -e "${OVER} ${TICK} ${str}"
return 0
else
[[ ! -t 1 ]] && local OVER=""
echo -e "${OVER} ${CROSS} ${output}"
return 1
fi
}

Loading…
Cancel
Save