anudeepND / whitelist

A simple tool to add commonly white listed domains to your Pi-Hole setup.
MIT License
4.17k stars 283 forks source link

No python3 support in sandbox system #261

Closed LeandroSQ closed 1 year ago

LeandroSQ commented 1 year ago

Just sharing this as it may help someone, if you are restrained of using python and installing is not an option (e.g using TrueNAS shell to interact with the docker container), you can git clone the repo (to /tmp in this example) and run the following one-liner:


while IFS= read -r line; do [ -n "$line" ] && pihole -w "$line"; done < /tmp/whitelist/domains/whitelist.txt

It will map each line from the whitelist.txt to a pihole -w command.