Topic Author
Posts: 2
Joined: 05 Nov 2019, 19:49

Watchdog bash script missing

05 Nov 2019, 20:02


I have a RevPi Connect+ V1.0, and I am trying to take advantage of the watchdog feature. The tutorial shows the following:
You can find the file “” in the directory “/etc/rc.local”.
As well as:
You can execute the script by typing the following command in the command line:
Quick note: I think this needs to be ">/dev/null"

However, I have neither the /connect directory nor the /rc.local directory. I am using the image that came with the RevPi Connect+ on startup (I have not flashed a new image), and I can successfully use piTest to access these bits, though I would prefer to use a .sh script for use in a cron job or similar, so I would like to see the example.

I have also tried to find the .sh scripts in the github repositories for the project, but they do not seem to be there. I managed to write a script in C to do what I need, though, again, I would much rather use a bash script.

If that script could be made available, I would appreciate it. Thanks.
User avatar
Posts: 683
Joined: 15 Dec 2016, 13:19
Location: Ostfildern

Re: Watchdog bash script missing

08 Nov 2019, 15:07

Dear netFluxNChill, here the script:

Code: Select all

pi@RevPi14607:~ $ cat connect/

while : ; do
    # let watchdog trigger on loss of internet connectivity
    if ! /bin/ping -c1 -n > /dev/null 2>&1 ; then

    # feed watchdog
    value=$(piTest -q -1 -r RevPiLED)
    value=$(( ($value + 128) % 256))
    piTest -w RevPiLED,"$value"
    sleep 10

Who is online

Users browsing this forum: No registered users and 1 guest