commit 78bfe33e2736141f6e7e5566694c61ddbf273dd2 from: xs date: Tue Jan 30 17:31:05 2024 UTC In the process of fixing whitelisting commit - 129b1c864a2fce547104fdbafca83662e491f8fe commit + 78bfe33e2736141f6e7e5566694c61ddbf273dd2 blob - f35008fa2cd0e0bdaa92b8575eca2f930781044c blob + 16531b725391f48cc1450c1af17d46e12651916a --- 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