Closed AndyVRD closed 3 years ago
You can create the file and put 4711
into it as the port is fix.
@dschaper Now that PADD is under the Pi-hole namespace, maybe we can just include it in the official container?
You can create the file and put
4711
into it as the port is fix.@dschaper Now that PADD is under the Pi-hole namespace, maybe we can just include it in the official container?
Thanks for the reply. Changed but now get another error...
./padd.sh: line 118: ftl_port: Servname not supported for ai_socktype ./padd.sh: line 118: /dev/tcp/localhost/ftl_port: Invalid argument
GetFTLData() {
ftl_port=4711
if [[ -n "ftl_port" ]]; then
exec 3<>"/dev/tcp/localhost/ftl_port"
Try maybe something like
exec 3<>"/dev/tcp/localhost/4711"
you accidentally removed a $
in front of the variable name
Also if I'm not mistaken you'll need to expose port 4711 on the docker container. What does your compose file / docker run look like?
Sorry i'm not that good with this so any change to explain where i can find this compose file? Changed the code like DL6ER say and now i got indeed a connection refused error.
./padd.sh: connect: Connection refused ./padd.sh: line 118: /dev/tcp/localhost/4711: Connection refused
What I mean is, how did you start the docker container? I'm guessing, from context, that you ran a command like docker run...
?
What I mean is, how did you start the docker container? I'm guessing, from context, that you ran a command like
docker run...
?
I used this guide and so used portainer to install it. :)
It won't run in a separate docker container. You have to have access to the socket in the pihole
container and exposing that is not a good idea since there is no verification/validation for access.
Now that PADD is under the Pi-hole namespace, maybe we can just include it in the official container?
Sure, we could. I don't know how useful it would be since it needs a terminal and most of the time docker is not started with an interactive terminal. I guess you could docker exec -it
and then run PADD but that's a lot of tinkering.
Example using a Pi with an attached display (pimoroni hyperpixel4 in my case). OS is Raspberry Pi OS Lite, 64-bit.
[ ] Get your display working.
[ ] Edit getty@tty1
.
sudo systemctl edit getty@tty1
Add:
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin your_username --noclear %I $TERM
[ ] Then edit ~/.bashrc
(or similar) and add:
Note: Assuming you don't want PADD to run when you SSH in to the Pi.
if [ "$(tty)" = "/dev/tty1" ] && [ -z "$SSH_CONNECTION" ]; then
docker exec -it pihole /usr/local/bin/padd
fi
Hi,
Is there any solution using PADD if Pihole is running in a container? I keep getting a error...
cat: /var/run/pihole-FTL.port: No such file or directory