12 lines
302 B
Bash
12 lines
302 B
Bash
#!/bin/bash
|
|
FIREWALL="/opt/firewall/firewall.sh"
|
|
ACCESS="/tmp/minute.log"
|
|
IP=($(grep $2 $ACCESS | grep "/block=" | cut -d '=' -f2 | cut -d ' ' -f1 | sed 's/"//'))
|
|
for i in "${IP[@]}"; do
|
|
if [[ "$i" == *"npub"* ]]; then
|
|
bash /opt/strfry-policies/block.sh $i
|
|
else
|
|
echo "No Npubs to block"
|
|
fi
|
|
done
|