Adding many lists via Shell

Hi,
I automated the deployment of PiHole via a Shell script for me. It is, because I re-install PiHole quite some times. And I can administer it for some other family Households in this way too.
I moved to a different city and wanted to reinstall PiHole.
I took my Singleboard computer, installed "debian buster by ayufan" on a SD card, as I did the last time. Then I imported my script and run it as sudo. This script imports my blocklists, exakt blocking and whitelisting entries and the regEXes.

These are about 800 entries... So, I´ve done it directly via Database

I´ve done
sudo sqlite3 /etc/pihole/gravity.db "INSERT INTO domainlist (type, domain, enabled, comment) VALUES (0,'outlook.office365.com', 1,'Microsoft365Global')";

and got back
sudo: sqlite3: command not found

I got shocked, because I reinstalled my PiHole 3 different time with this script successfully.

I went to the docs and red, that it now have to be
sudo pihole-FTL sqlite3 /etc/pihole/gravity.db "INSERT INTO domainlist (type, domain, enabled, comment) VALUES (0,'outlook.office.com', 1,'Microsoft365Global')";

I replaced every sqlite3 to pihole-FTL sqlite3. I can import the Blocklists at least for now. But sometimes it´s still complaining about table can´t be found. What did you change at the database-structure?

Have you considered using the teleporter function, which exports all your existing Pi-hole settings for later import into the new installation?

Yes.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.