|
@@ -0,0 +1,11 @@
|
|
|
|
|
+#!/bin/bash
|
|
|
|
|
+((EUID == 0 )) || { echo "Need root"; exit 1; }
|
|
|
|
|
+set -euo pipefail
|
|
|
|
|
+
|
|
|
|
|
+tmp=$(mktemp)
|
|
|
|
|
+trap "/bin/rm -f ${tmp}" EXIT SIGHUP SIGINT SIGTERM
|
|
|
|
|
+
|
|
|
|
|
+curl -sSfo ${tmp} http://someonewhocares.org/hosts/zero/hosts
|
|
|
|
|
+sed -i '0,/#<\/localhost>/d' ${tmp}
|
|
|
|
|
+grep -E '^[0#]+' ${tmp} > /etc/hosts.ban
|
|
|
|
|
+systemctl reload dnsmasq.service
|