At boot I need to run a script that uses gpio to read input from a motion sensor in an infinite loop, so I put
/home/pi/myscript &
in /etc/rc.local, before the exit 0 line. The script does not start though. Any help troubleshooting this?How do I even check that /etc/rc.local is being run? I tried putting echo commands in /etc/rc.local before myscript, but I can't find anything when I grep for the message in /var/log/messages.
Needless to say, the script runs flawlessly when started at the prompt (via ssh from another computer).
This would be for a demo due this coming Monday, so a timely answer would be highly appreciated.
Thanks!