-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
Problem whith whitelist.py #265
Comments
Please check #264, does it help? |
I think the problem has nothing to do with that incident. |
Oh no! I don't have pihole for now, so I can't test this further. I sure hope this isn't caused by a recent major change. If so, then the scripts used here may need updated accordingly. |
Certainly, it's what you're saying. I installed Pi-hole this week; I've never had it before. |
I tried with the root user, left it for an hour, and when I came back, it didn't give an error. I'm going to try with the other user. |
Confirmed, it's working fine now. From the moment I execute the command until it finishes, it takes 11 minutes. |
@osespe can you please use root and report the outputs of whitelist/scripts/whitelist.py Lines 55 to 60 in 30c7586
If Docker exists, it assumes Docker is running pihole. Here we should probably be checking to see if Docker exists, then if it exists, see if there is also a container called |
I don't use Docker; I have Pi-hole installed without Docker, directly on Ubuntu. On the other hand, randomly, whether with root or another user with permissions, I get this error: This script will download and add domains from the repo to whitelist. [i] Pi-hole path exists Usually, I run it again, and it works fine. |
When I run
sudo python3 whitelist/scripts/whitelist.py
, it adds the lists, but when it reaches the section "Restarting Pi-hole.This could take a few seconds," it just hangs without doing anything else. The only way is to do a Ctrl+C, and it gives the following error:
This script will download and add domains from the repo to whitelist.
All the domains in this list are safe to add and does not contain any tracking or adserving domains.
[i] Pi-hole path exists
[i] Write access to /etc/pihole verified
[i] Pi-Hole Gravity database found
[i] 191 domains and 191 SQL queries discovered
[i] Connecting to Gravity.
[i] Successfully Connected to Gravity.
[i] Checking Gravity for domains added by script.
[i] 96 Domains from script in whitelist already.
[i] Checking Gravity for domains added by user that are also in script.
[i] Found 0 domains added by the user that would be added by script.
[i] Checking Gravity for domains previously added by script that are NOT in new script.
[i] Found 0 domain(s) added previously by script that are not in script.
[i] Checking script for domains not in Gravity.
[i] 95 domain(s) NOT in Gravity that are in new script.
[i] Checking Gravity for newly added domains.
[i] All 95 new domain(s) have not been added to Gravity.
[i] There are a total of 566 domains in your whitelist (regex(13) & exact(553))
[i] The database connection is closed
[i] Restarting Pi-hole. This could take a few seconds
^C
Done. Happy ad-blocking :)
Star me on GitHub: https://github.com/anudeepND/whitelist
Buy me a coffee: https://paypal.me/anudeepND
Traceback (most recent call last):
File "/home/x/whitelist/scripts/whitelist.py", line 336, in
restart_pihole(args.docker)
File "/home/x/whitelist/scripts/whitelist.py", line 60, in restart_pihole
subprocess.call(['pihole', '-g'], stdout=subprocess.DEVNULL)
File "/usr/lib/python3.10/subprocess.py", line 347, in call
return p.wait(timeout=timeout)
File "/usr/lib/python3.10/subprocess.py", line 1209, in wait
return self._wait(timeout=timeout)
File "/usr/lib/python3.10/subprocess.py", line 1959, in _wait
(pid, sts) = self._try_wait(0)
File "/usr/lib/python3.10/subprocess.py", line 1917, in _try_wait
(pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt
The text was updated successfully, but these errors were encountered: