更新 'README.md'
This commit is contained in:
parent
e2e08c5851
commit
090764fc4c
@ -10,7 +10,7 @@ voipbl.sh
|
|||||||
```
|
```
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
URL="http://www.voipbl.org/update/"
|
URL="https://voipbl.org/update/"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
echo "Downloading rules from VoIP Blacklist"
|
echo "Downloading rules from VoIP Blacklist"
|
||||||
@ -19,7 +19,7 @@ wget -qO - $URL -O /tmp/voipbl.txt
|
|||||||
echo "Loading rules..."
|
echo "Loading rules..."
|
||||||
|
|
||||||
# Check if rule set exists and create one if required
|
# Check if rule set exists and create one if required
|
||||||
if ! $(/usr/sbin/ipset list voipbl > /dev/null 2>&1); then
|
if ! $(/sbin/ipset list voipbl > /dev/null 2>&1); then
|
||||||
ipset -N voipbl iphash
|
ipset -N voipbl iphash
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ ipset destroy voipbl_temp > /dev/null 2>&1 || true
|
|||||||
ipset -N voipbl_temp iphash hashsize 131072 maxelem 260000
|
ipset -N voipbl_temp iphash hashsize 131072 maxelem 260000
|
||||||
|
|
||||||
cat /tmp/voipbl.txt |\
|
cat /tmp/voipbl.txt |\
|
||||||
awk '{print "if ! [[ \""$1"\" =~ ^#$|^0.0.0.0 ]]; then /usr/sbin/ipset -A voipbl_temp \""$1"\" ; fi;"}' | sh
|
awk '{print "if ! [[ \""$1"\" =~ ^#$|^0.0.0.0 ]]; then /sbin/ipset -A voipbl_temp \""$1"\" ; fi;"}' | sh
|
||||||
|
|
||||||
ipset swap voipbl_temp voipbl
|
ipset swap voipbl_temp voipbl
|
||||||
ipset destroy voipbl_temp || true
|
ipset destroy voipbl_temp || true
|
||||||
|
Loading…
Reference in New Issue
Block a user