Skip to content

Instantly share code, notes, and snippets.

@vbezhenar
Last active August 30, 2018 11:19
Show Gist options
  • Save vbezhenar/a0065fdb50f6aa601a20 to your computer and use it in GitHub Desktop.
Save vbezhenar/a0065fdb50f6aa601a20 to your computer and use it in GitHub Desktop.
#!/bin/sh
url='http://pgl.yoyo.org/as/serverlist.php?hostformat=nohtml'
ftp -o - "$url" | awk '{printf "local-zone: \"%s.\" static\n", $1}' > /var/unbound/etc/blacklist.conf.new || exit $?
mv /var/unbound/etc/blacklist.conf.new /var/unbound/etc/blacklist.conf
rcctl reload unbound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment