Skip to content
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

PADD not starting #47

Closed
mikebetz42 opened this issue Feb 19, 2019 · 10 comments
Closed

PADD not starting #47

mikebetz42 opened this issue Feb 19, 2019 · 10 comments

Comments

@mikebetz42
Copy link

PADD not starting, and yes I have edited "~/.bashrc". it use to work, but it's no longer displaying on the Pi. I can run it in an SSH session without a problem.

Pi-hole® v4.2.2, Web v4.2, FTL v4.2.2, PADD v2.2.1

Linux 4.14.98-v7+ armv7l
Raspbian GNU/Linux 9.8 (stretch)

img_20190219_114811

Thank you,

Mike

@maserowik
Copy link

maserowik commented Feb 19, 2019 via email

@mikebetz42
Copy link
Author

I fixed my problem.... edited "~/.bashrc" and

if [ "$TERM" == "linux" ] ; then

changed to

if [ "$TERM" == "xterm" ] ; then

Did the trick.

@tspotz
Copy link

tspotz commented Feb 20, 2019

I fixed my problem.... edited "~/.bashrc" and

if [ "$TERM" == "linux" ] ; then

changed to

if [ "$TERM" == "xterm" ] ; then

Did the trick.

since a SSH connection is also "xterm" this leads to PADD starting even on ssh'd terminal.
i changed this last night (after upgrading the pi) and encounter this problem to

if [ "$SSH_TTY" == "" ] ; then

locally loged in the SSH_TTY is empty.

@stephenjmcmahon
Copy link

stephenjmcmahon commented Feb 24, 2019

Sorry to re-open this but I've also run into the same issue using the latest PADD (v3.0.2) only after updating the kernel from

pi@PiHole-02:~ $ uname -a
Linux PiHole-02 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

to

pi@pihole-01:~ $ uname -a
Linux pihole-01 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

I had to sudo raspi-config to re-enable auto-login to console and verified ~/.bashrc still had the included code to auto-run but still nothing.

as @tspotz mentioned above that was the trick to fixing this.

changing
if [ "$TERM" == "linux" ] ; then
to
if [ "$SSH_TTY" == "" ] ; then
in ~/.bashrc

@R3clu23
Copy link

R3clu23 commented Mar 4, 2019

I fixed my problem.... edited "~/.bashrc" and
if [ "$TERM" == "linux" ] ; then
changed to
if [ "$TERM" == "xterm" ] ; then
Did the trick.

since a SSH connection is also "xterm" this leads to PADD starting even on ssh'd terminal.
i changed this last night (after upgrading the pi) and encounter this problem to

if [ "$SSH_TTY" == "" ] ; then

locally loged in the SSH_TTY is empty.

I have the same problem, how did you edit the .bashrc file if you can't stop the script from running?

@stephenjmcmahon
Copy link

Ctrl+C should stop PADD from running and drop you back into CLI

@R3clu23
Copy link

R3clu23 commented Mar 4, 2019

Ctrl+C should stop PADD from running and drop you back into CLI

It doesn't it just restarts the script over again.

I edited my .bashrc with:

if [ "$TERM" == "xterm" ] ; then

@tspotz
Copy link

tspotz commented Mar 5, 2019

press Ctrl-C several times since the .bashrc itself is a bash-script which should be exited too (seen the while loop which restarts the padd.sh after waiting a second ?)
I connected directly with an USB Keyboard to RPi

@R3clu23
Copy link

R3clu23 commented Mar 5, 2019

press Ctrl-C several times since the .bashrc itself is a bash-script which should be exited too (seen the while loop which restarts the padd.sh after waiting a second ?)
I connected directly with an USB Keyboard to RPi

Okay, pressing ctrl-c while the script loaded did in fact cancel the script from loading and I'm back at the pi@pihole~$ CLI line. Thanks for the help.

@timkingman
Copy link

timkingman commented Apr 5, 2019

When raspi-config turns on auto-login, it writes your current $TERM to /etc/systemd/system/getty@tty1.service.d/autologin.conf. Edit that file and change the last parameter to linux, and then the test in .bashrc should start padd.sh on only the console auto-login.

Edit: or change the last arg to literal $TERM, per this raspi-config issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants