Commit Diff
--- http-ban.sh +++ http-ban.sh @@ -40,8 +40,13 @@ pre_block() { block() { GF=$(for ip in $(printf %s\\n $QUICK_WHITELIST); do printf -- '-e "^%s$" ' "$ip"; done) - GF=${GF:-'.*'} - pre_block | sort | uniq | grep -v $GF + pre_block | sort | uniq | { + if test -n "$GF"; then + grep -v $GF + else + cat - + fi + } } umask 127