Page 1 of 1

Pihole & PADD

Posted: Fri Dec 06, 2019 5:20 pm
by co2
I'm trying to get PADD up and running on my install
Padd is an expanded version of piholes chronometer
It's a script and on lite installs of buster I was able to get it running almost like it ran on a separate terminal on the LCD than my ssh sessions.

I like dietpi but I'm stuck at a impass at the moment trying to get this script to load on reboot... I tried the autorun script and putting it there but it still doesn't load.

Re: Pihole & PADD

Posted: Fri Dec 06, 2019 6:27 pm
by MichaIng
Cool, I like such shell scripts, simple and effective :). We might want to add this as an install option :?.

Sadly is has no internal update loop, which would be very easy to implement, so running the script with certain argument would have it running as foreground process, updating the view every N seconds, or such.

However for now the following should do:

Code: Select all

wget -O /mnt/dietpi_userdata/
chmod +x /mnt/dietpi_userdata/
echo 'while :; do /mnt/dietpi_userdata/; sleep 1; done' > /var/lib/dietpi/postboot.d/padd
With this, there is not even a login required on the main console. The loop starts as part of the boot scripts, when hitting CTRL+C it exits and you'll see the login prompt. SSH connections are not affected by this of course.

If this works fine, I'll see if I can contribute the script internal loop to this project and add it as install option along with or aside of Pi-hole.

Re: Pihole & PADD

Posted: Fri Dec 06, 2019 11:14 pm
by co2
no dice boss, my LCD screen show booting process stops at

[ OK ] Started LSB: Lightweight SSH server.

which it did before,

login in via SSH shows:

Waiting for DietPi-Postboot to finish... (Press CTRL+C to abort)

as for updating PADD normally on the LCD if the system is rebooted it checks to see if the version is upto date


I did a writeup on how I managed to get PADD working on my waveshare about a year ago but dietpi seems to work sightly differently

Re: Pihole & PADD

Posted: Sun Dec 08, 2019 2:45 pm
by co2
if i go to the directory '/mnt/dietpi_userdata/' in my ssh term i can launch the by typing: ./

but my waveshare screen doesnt seem to pass
[ OK ] started LSB: Lightweight SSH Server

would there be a way to get the script to launch on the waveshare?

I did follow the waveshare 'fix' that JSmith717 posted to get the screen to work so i'm not sure if that affects anything.


Re: Pihole & PADD

Posted: Mon Dec 09, 2019 8:42 pm
by MichaIng
Ah yeah I didn't think about dietpi-postboot needs to finish, to allow further logins, hence postboot.d is not useful for background jobs, only for oneshot scripts. Sorry for this wrong suggestion :roll:.

Okay then dietpi-autostart > 14 : Custom should do it. Move your script to /var/lib/dietpi/dietpi-autostart/ then:

Code: Select all

mv /var/lib/dietpi/postboot.d/padd /var/lib/dietpi/dietpi-autostart/
This runs independantly from login as well.

But most elegant way is to create an own systemd unit:

Code: Select all

cat << _EOF_ > /etc/systemd/system/padd.service
After=pihole-FTL.service dietpi-postboot.service getty@tty1.servicce rc-local.service

ExecStart=/bin/dash -c 'while :; do /mnt/dietpi_userdata/; sleep 1; done'

systemctl daemon-reload
systemctl enable padda
rm /var/lib/dietpi/postboot.d/padd
This should do it and would be how we'd implement it into dietpi-software.
The "After=.." part is only to assure that Pi-hole is up already and that the chance for other idle service output mess is minimised (login prompt, service starts, ...)

Okay but if Waveshare does not show anything after Dropbear launch, then it seems to be not default tty1... Do you have a second monitor attached? If with above systemd unit it is the same, then we'd need to find out which tty is attached to waveshare and what is attached to tty1. E.g. from SSH, run ps a to show all processes + the TTYs they're attached to.

Re: Pihole & PADD

Posted: Tue Apr 14, 2020 11:08 pm
by asm1
Been poking around with this.
Now have it working fine on a 5" Waveshare HDMI LCD in latest 6.29 Diet-pi beta :)
FYI theres a typo in

Code: Select all

systemctl enable padda
I copied and pasted 4X wondering why it would not work lol.

Theres also a "Touchscreen" alternative - PHAD, which is based on PADD but with more info and cycles through screens - also -COLOURS :P :P . (Not mine, am a user rather than a Creator)

its a bit more complicated to install, but I have had it working also. Will try it using this cleaner install method.

Pi-hole Alternative Display - not sure if actively being developed which is a shame.