-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running this in a docker-container #44
Comments
Update: I added it to the creation of the pihole-unbound-image. Created a volume which will remain untouched upon recreation of the image/container which maps to the my-pihole-lists-repository. It takes some manual steps the first time and hopefully by using git config credential.helper store I don't have to enter credentials anymore after recreating an image/container. My first initpull on my second pihole resulted in: During pihole_cloudsync --initpull [i] Creating new gravity databases... with an empty gravity.db. When running pihole -g again I had a new gravity.db but the webinterface still said I had 0 domains on the adlist. After another bounce of the container everything looked normal again. |
Another update: updating the container with a new image gave me again to enter credentials. As I mapped a volume to the my-pihole-lists-directory I entered in .git/config hardcoded in the url username and password (or better the key). It's not the safest way but can't find another way at the moment. Then I would like to add something to the cron, but that should be based on whether it's a primary or secundairy pihole. Maybe just a file with the cron-entry which should be copied through another cron-job (which can be made hardcoded). |
Think I found what's causing the issue. As I try it manually I notice the following: root@pihole2:/etc/pihole# sqlite3 gravity.db "DROP table adlist;" Then I checked csv and table and specifically line 12: csv: d,type,domain,enabled,date_added,date_modified,comment table: root@pihole2:/etc/pihole# sqlite3 gravity.db "select * from domainlist;" This regex-thing is causing trouble and requires a second pihole -g-run |
adding -- ascii to the import-command solves it and the row gets nicely imported. |
And after another run still trouble. Tried it with adding ".separator ','" to the import-lines and -v (for verbose logging) and without -ascii. Still trouble with respect to foreign keys: [i] Creating new gravity databases... |
1 similar comment
And after another run still trouble. Tried it with adding ".separator ','" to the import-lines and -v (for verbose logging) and without -ascii. Still trouble with respect to foreign keys: [i] Creating new gravity databases... |
Finally managed to solve the foreign key stuff. Even though foreign keys are enabled it was still complaining. Solved it by also exporting the adlist_by_group and domainlist_by_group-tables, dropping them and importing them. Now pihole -g runs without error. |
To solve the issue mentioned in stevejenkins#44 had to add the export and import of 2 tables. Also added the -v-flag during import so you get some information on the screen.
I run Pihole and Unbound in a Docker-container, so I guess I have to put the script in the docker-image as well and let it run from there. I'll check out how I can add this to it. Might indeed be convenient. Added a 2nd pihole in another network a few days ago, but adding manually all the lists is one hell of a job, so I quit after a few. :-)
The text was updated successfully, but these errors were encountered: