mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-23 21:09:48 +00:00
Merge pull request #2501 from pi-hole/fix/restart-dns-error-on-success
Fix restartDNS returning code 1 even when it worked
This commit is contained in:
commit
35e53ab9c7
1 changed files with 2 additions and 0 deletions
2
pihole
2
pihole
|
@ -134,9 +134,11 @@ restartDNS() {
|
||||||
|
|
||||||
if [[ "${status}" -eq 0 ]]; then
|
if [[ "${status}" -eq 0 ]]; then
|
||||||
[[ -t 1 ]] && echo -e "${OVER} ${TICK} ${str}"
|
[[ -t 1 ]] && echo -e "${OVER} ${TICK} ${str}"
|
||||||
|
return 0
|
||||||
else
|
else
|
||||||
[[ ! -t 1 ]] && local OVER=""
|
[[ ! -t 1 ]] && local OVER=""
|
||||||
echo -e "${OVER} ${CROSS} ${output}"
|
echo -e "${OVER} ${CROSS} ${output}"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue