chill wrote:
> Thanks Greg - that's much neater, and works the same way.
No problem! If you want to add a limit, you could do something like
this:
Code:
--------------------
count=10 # approx time limit in seconds
while ! pigs t >/dev/null 2>&1 ; do
if (( count-- <= 0 )) ; then
printf "\npigpiod failed to initialize within time limit\n"
exit 1 # or however you want to deal with failure
fi
# printf "\nWaiting for pigpiod to initialize\n"
sleep 1
done
printf "\npigpiod is running\n"
--------------------
------------------------------------------------------------------------
gregklanderman's Profile: http://forums.slimdevices.com/member.php?userid=3524
View this thread: http://forums.slimdevices.com/showthread.php?t=111502
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix