From 94f5fb8a3f7fa7ba3a856ae56055270c830c9afe Mon Sep 17 00:00:00 2001 From: Johannes Truschnigg Date: Fri, 18 Mar 2022 14:32:11 +0100 Subject: [PATCH] Also check for ./__lagdetect.awk --- lagdetect.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lagdetect.sh b/lagdetect.sh index 37769dc..8fe0eb1 100755 --- a/lagdetect.sh +++ b/lagdetect.sh @@ -91,6 +91,13 @@ do done +if ! test -r ./__lagdetect.awk +then + printf 'FATAL: "__lagdetect.awk" not found; are you in the correct directory?"\n' + exit 1 +fi + + if [ x"${PING_GW_IPV6:-no}" = xyes ] then PING_PEERS="$(traceroute -6 -n -m 2001:4860:4860::8888 | awk '{if("1" == $1){print $2}}') ${PING_PEERS}" @@ -193,4 +200,4 @@ fping --loop --retry=1 --size=1280 --period="${PING_INTERVAL}" --random ${PING_P -v PINGSLOTS="${PING_SLOTS_PER_PEER}" \ -v FUDGE="${FUDGE_MS}" \ -v PING_PEERS="${PING_PEERS}" \ - -f __lagdetect.awk + -f ./__lagdetect.awk -- 2.39.5