-
Notifications
You must be signed in to change notification settings - Fork 0
/
command_list.sh
25 lines (15 loc) · 1.03 KB
/
command_list.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#curl -sSf "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" | grep '^0\.0\.0\.0' | awk '{print "local-zone: \""$2"\" always_nxdomain"}' > /etc/unbound/blacklists/stevenblack.conf
#curl -sSf "https://mirror1.malwaredomains.com/files/justdomains" | awk '{print "local-zone: \""$1"\" always_nxdomain"}' | grep -v 'local-zone: "" always_nxdomain' > /etc/unbound/blacklists/malwaredomains.conf
#energized
#curl -sSf "https://block.energized.pro/ultimate/formats/domains.txt" | grep -v "^#" | awk '{print "local-zone: \""$1"\" always_nxdomain"}' > /etc/unbound/blacklists/energized.conf
#Activas
curl -sSf "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" | grep '^0\.0\.0\.0' | awk '{print "local-zone: \""$2"\" always_nxdomain"}' > /etc/unbound/blacklists/stevenblack.conf
result=$(/usr/sbin/unbound-checkconf);
result_ok=$(echo $result | grep "no error");
echo "result_ok: "$result_ok
if [ -n "$result_ok" ]; then
echo "config is ok"
unbound-control reload
else
echo "config is not ok"
fi