File: check_extensions

package info (click to toggle)
ipset 6.23-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,356 kB
  • ctags: 3,215
  • sloc: ansic: 30,595; sh: 14,626; makefile: 212; pascal: 125; awk: 3
file content (12 lines) | stat: -rwxr-xr-x 292 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

ipset=${IPSET_BIN:-../src/ipset}

read ip t timeout p packets b bytes <<< $($ipset l $1 | grep ^$2)
test -z "$timeout" -o -z "$packets" -o -z "$bytes" && exit 1
test $timeout -gt $3 -o $timeout -lt $(($3 - 10)) && exit 1
test $packets -ne $4 -o $bytes -ne $5 && exit 1
exit 0