Skip to content

Instantly share code, notes, and snippets.

View cusco's full-sized avatar

Tiago Geada cusco

View GitHub Profile
#!/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