Where are the blacklist files?

I am trying to make a python script that edits the blacklist files for different user groups based on the time. For example, I want the kids computers to not access youtube after 8 pm. However, I can not find where the blacklist text files are that i can edit with my script. Where are they, and if i edit the files does it update immedietly?

As of V5, individual files are not used. Adlists, domains and groups are in /etc/pihole/gravity.db


Will there be any problems if I update the database while the program is running? Also would i have to refresh it? Thanks!

You need sudo to write to the database, but there should be no conflict.

You have to execute pihole restartdns reload-lists to make pihole aware of the changes.

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