Last active
August 5, 2022 11:01
-
-
Save origamiofficial/5f3f7ca684decdb16376561d19b9b853 to your computer and use it in GitHub Desktop.
Unbound root hints automatically updater script. After updating the root.hints file, this script will restart Unbound & Pi-hole for smoother operations. Add this cron entry to run the script at 3 AM on the 1st day of every month: "0 3 1 */1 * root /bin/bash /This/Scripts/Location/UnboundRootHintsUpdate.sh"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RootHintsLocation="/var/lib/unbound/root.hints" | |
# Unbound Root.hints Update | |
/usr/bin/wget -O "$RootHintsLocation" https://www.internic.net/domain/named.root >/dev/null 2>&1 | |
service unbound restart && pihole restartdns >/dev/null 2>&1 | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment