Closed klutchell closed 1 year ago
I was able to run PADD inside official Pi-hole containers.
Which image are you using?
Also the official Pi-hole container, with an external PiTFT display. Are you running the container as privileged?
Here's the compose file: https://github.com/klutchell/balena-pihole/blob/main/docker-compose.yml
No. I'm running using the basic setup, but I didn't tested on a external display. I only tested on different terminals.
Replacing
console_height=$(stty size | awk '{ print $1 }')
console_width=$(stty size | awk '{ print $2 }')
with
console_height=$(tput lines)
console_width=$(tput cols)
Which is what was working before seems to solve it on my devices. Do we know if the switch to stty size
was intentional?
Do we know if the switch to stty size was intentional?
I think it was, but it needs confirmation.
Yes, it was intentional.
Because of the (claimed) tput overhead: https://github.com/dylanaraps/writing-a-tui-in-bash#escape-sequences
https://github.com/dylanaraps/writing-a-tui-in-bash#using-stty
Did you see this? https://github.com/docker/compose/issues/1876
tty:true
should fix it.
tty: true
is set by default by the balena supervisor (I confirmed by inspecting the container).
However I have a workaround by using stty size -F /dev/tty1
so we can close this if no one else is experiencing any issues.
Let's keep it open until it goes auto-stale in 30 days. Just to make sure users can find it easier if they experience the same issue.
Fix released with https://github.com/pi-hole/PADD/releases/tag/v3.10.0
Describe the bug
Switching from
tput
tostty size
results in errors if tty does not exist.To Reproduce Steps to reproduce the behavior:
/usr/src/app/padd.sh > /dev/tty1
)Expected behavior
The old method of calculating terminal size without a tty worked with no issues.
Screenshots
Additional context