Skip to content

Instantly share code, notes, and snippets.

@cusco
Created March 23, 2025 19:34
Show Gist options
  • Save cusco/3dd9691c2cab3d4c894207e882dde079 to your computer and use it in GitHub Desktop.
Save cusco/3dd9691c2cab3d4c894207e882dde079 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
PATH=$PATH:/usr/local/bin
curl -s "https://v.firebog.net/hosts/lists.php?type=tick"|while read adl; do echo "DELETE from adlist where address = '$adl';"; done|sqlite3 /etc/pihole/gravity.db
echo "delete from adlist where comment = 'auto-tick';"|sqlite3 /etc/pihole/gravity.db
curl -s "https://v.firebog.net/hosts/lists.php?type=tick"|while read adl; do echo "insert into adlist (address, enabled, comment) values ('$adl', 1, 'auto-tick');"; done|sqlite3 /etc/pihole/gravity.db
pihole -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment