Adding lists automatically via CLI/shell script

Hi,

I had been using a script to automatically update Adlists for years and it had been working great:

However, it looks like this past February the database changed and you can no longer use the old sqlite3 commands to do it (discussed here). The old code throws errors and doesn't change anything:

Any idea how to change those ~5 lines below to work with the new commands ?

#download firebog lists
wget https://v.firebog.net/hosts/lists.php?type=nocross -O $workdir/firebog.list

#remove all current adlists in DB (this way old/outdated lists that Firebog removed won't be added)
sudo pihole-FTL sqlite3 /etc/pihole/gravity.db "DELETE FROM adlist"

while read nocross; do

sudo pihole-FTL sqlite3 "/etc/pihole/gravity.db" "insert or ignore into adlist (address, comment, enabled) values ('$nocross', 'firebog nocross', 1);"
 
done < $workdir/firebog.list

Thanks

1 Like

You are using a third-party script that is properly hosted on GitHub.

Please consider to contact the script maintainer or open an issue in that third party GitHub repository at Issues · jpgpi250/piholemanual · GitHub.

That way, you would likely be helping other people using that script while addressing your issue at the same time.

Yeah that makes sense, but since the exact script has been discussed on this forum before and I believe the creator @jpgpi250 posts here alot I'll just ping them on this thread.

Thanks

Please use GitHub for reporting issues. This isn't the place for that.