From 8e8e3dd06214ed4cf3f0b0396915a48d0aa95e78 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Tue, 2 Jun 2020 10:02:03 -0500 Subject: [PATCH] Use standard error_val --- gravity-sync.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 0b22698..e7ce31e 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -862,16 +862,11 @@ function config_generate { then MESSAGE="Testing Network Connection (PING)" echo_stat - ping -c 3 ${INPUT_REMOTE_HOST} - if [ "$?" != "127" ] - then - echo_fail - else - echo_good - fi + ping -c 3 ${INPUT_REMOTE_HOST} 2>/dev/null + error_validate else MESSAGE="Bypassing Network Testing (PING)" - echo_info + echo_warn fi MESSAGE="Enter SSH user with SUDO rights on primary Pi-hole server"