From: Johannes Truschnigg Date: Fri, 18 Mar 2022 13:32:11 +0000 (+0100) Subject: Also check for ./__lagdetect.awk X-Git-Url: https://johannes.truschnigg.info/gitweb/?a=commitdiff_plain;h=94f5fb8a3f7fa7ba3a856ae56055270c830c9afe;p=sqm_lagthrottle Also check for ./__lagdetect.awk --- 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