Closed geerlingguy closed 1 year ago
Huh... well, after a good deal of work and testing, apparently in Pihole 5 and later, the adlists are stored in the gravity database itself, and the adlists.list
file on disk (in /etc/pihole/adlists.list
) is just an artifact of an old installation.
Who knew?
It doesn't seem like there's a simple way to programmatically alter the adlist outside of maybe an API request somehow?
Still pushed one minor change to make working with relative-path config dirs easier.
I have been meaning to add this in at some point so it's easy to configure out of the box... but basically, the
/etc/pihole/adlists.list
file controls what ad lists Pi hole uses. There's also acustom.list
to configure DNS... maybe I'll add that in a future issue.But basically, add a variable like
pihole_adlists
and have it be a list with one adlist URL per line.If the variable is not empty, write the contents line by line to a file named
adlists.list
inside thepi-hole/etc-pihole
directory.