Skip to content
Permalink
Browse files

Prepare piWatcher support and set timers

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 25, 2019
1 parent ca415a9 commit 465498a146accdd8dcc7d2539f56b67052f41270
Showing with 6 additions and 2 deletions.
  1. +6 −2 piwatcher
@@ -24,14 +24,18 @@ if [[ $platform < 10 ]]; then

echo 1 > /var/log/nems/piwatcher

# Set piWatcher to power on the NEMS Server after 15 seconds of power off
# Tell the piWatcher to power off the NEMS Server if it hasn't received a heartbeat for 2 minutes
/usr/local/bin/piwatcher watch 120

# Set piWatcher to re-power the NEMS Server after 15 seconds of power off
/usr/local/bin/piwatcher wake 15

# Prevent piWatcher from shutting down the NEMS server
while true
do
# Send heartbeat to piWatcher every 45 seconds, resetting the 2 minute countdown
/usr/local/bin/piwatcher status
sleep 10
sleep 45
done

fi

0 comments on commit 465498a

Please sign in to comment.
You can’t perform that action at this time.