Closed DieSchoeneWolke closed 1 year ago
I don't think you can do this without actually installing the script inside the container. I'm not a Docker expert though and I might be wrong.
This could work:
Set GRAVITY_DB
config variable to point to the gravity.db
file (that is stored in /etc/pihole
mount, check your docker-compose.yml file), run the script then restart FTL within the container docker exec -it pihole "pihole restartdns"
.
Thanks that did it!
Have a great weekend and happy holidays soon!
Just remember that scheduled run won't be able to execute the last command so I suggest checking out this.
oof. Sorry for being too lazy but honestly as a relatively new user I can't study every repo when I have a hard time understanding most of it, especially since I'm trying to run a pi-hole on my openmediavault server for like 2 months. 😠I ran the script at the default values beside the edited gravity.db path from my docker volume. I then edited the /etc/pihole-updatelists.conf and included the recommended firebog and whitelist file. Should this suffice with the last hint you gave me?
No, it won't reload DNS server after weekly scheduled lists update. (technically Pi-hole's image should do internal lists update a day after my default schedule) As mentioned in my previous message you have to edit one thing:
sudo systemctl edit pihole-updatelists.service
[Service]
Type=oneshot
ExecStartPost=docker exec -it pihole "pihole restartdns"
This should do it but I cannot guarantee it.
You might also need to add UPDATE_GRAVITY=null
to the config to prevent some errors popping out in the output.
sudo systemctl edit pihole-updatelists.service
doesn't work because systemctl
isn't installed in my container.
You should execute those on the host machine, where you installed my script.
Ah now it broke the ice I hope.
So I started from scratch now with this repo. I think I completely misunderstood the point of this.
So basically what I only needed to do is to run the script on my host, then use your docker image instead of the official one, configure this as explained in the docker section with the additional volume and then just configure the /etc/pihole-updatelists.conf
file on my host machine, right?
If you want to use the image from this repo you shouldn't install the script in the host machine at all - just follow the readme. The script will run inside the container if you use jacklul/pihole image, the steps I wrote earlier are for the cases where you don't want to use anything than official pihole/pihole image but still use this script.
Hey and thank you! Is it possible to attach the script to a running pi hole docker container so I don't have to rebuild?