mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
reduce ping times for faster script completion
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
This commit is contained in:
parent
e131395cce
commit
7159ecb632
@ -592,7 +592,7 @@ ping_gateway() {
|
||||
# Try to quietly ping the gateway 3 times, with a timeout of 3 seconds, using numeric output only,
|
||||
# on the pihole interface, and tail the last three lines of the output
|
||||
# If pinging the gateway is not successful,
|
||||
if ! ${cmd} -c 3 -W 2 -n ${gateway} -I ${PIHOLE_INTERFACE} >/dev/null; then
|
||||
if ! ${cmd} -c 1 -W 2 -n ${gateway} -I ${PIHOLE_INTERFACE} >/dev/null; then
|
||||
# let the user know
|
||||
log_write "${CROSS} ${COL_RED}Gateway did not respond.${COL_NC} ($FAQ_GATEWAY)\n"
|
||||
# and return an error code
|
||||
@ -613,7 +613,7 @@ ping_internet() {
|
||||
ping_ipv4_or_ipv6 "${protocol}"
|
||||
log_write "* Checking Internet connectivity via IPv${protocol}..."
|
||||
# Try to ping the address 3 times
|
||||
if ! ${cmd} -W 2 -c 3 -n ${public_address} -I ${PIHOLE_INTERFACE} >/dev/null; then
|
||||
if ! ${cmd} -c 1 -W 2 -n ${public_address} -I ${PIHOLE_INTERFACE} >/dev/null; then
|
||||
# if it's unsuccessful, show an error
|
||||
log_write "${CROSS} ${COL_RED}Cannot reach the Internet.${COL_NC}\n"
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user