diff options
Diffstat (limited to 'tests/check_counters')
-rwxr-xr-x[-rw-r--r--] | tests/check_counters | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/check_counters b/tests/check_counters index 0099f23..912067a 100644..100755 --- a/tests/check_counters +++ b/tests/check_counters @@ -1,6 +1,8 @@ #!/bin/bash -read ip p packets b bytes <<< $(../src/ipset l $1 | grep ^$2) +ipset=${IPSET_BIN:-../src/ipset} + +read ip p packets b bytes <<< $($ipset l $1 | grep ^$2) test -z "$packets" -o -z "$bytes" && exit 1 test $packets -ne $3 -o $bytes -ne $4 && exit 1 exit 0 |