From be5858428ca4f3fa4efa6d6b4a7012fca4eb3b06 Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Sat, 22 Jan 2022 08:36:45 -0500 Subject: [PATCH] start hbc only after we hav a network connection --- run_hbc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run_hbc b/run_hbc index 8f58c55..7d9f378 100755 --- a/run_hbc +++ b/run_hbc @@ -3,5 +3,11 @@ D=$(dirname $0) pkill -f $D/hbc 2>/dev/null sleep 1 +while true; do + ping -qAW 6 -c 2 1.1.1.1 + if [ $? -eq 0 ]; then + break + fi +done $D/hbc $@