I've been having a lot of problems trying to get my python script to run at boot. I've essentially narrowed it down to a problem with forking.
I'm running on a RPi3.
In rc.local if I have:
python /home/pi/script.py
It seems to run, however as soon as I add
python /home/pi/script.py &
I get zero results. If I run rc.local manually after boot the fork appears to work as expected. I've also tried to point rc.local to a .sh file in /home/pi with exactly the same results. This even happens with basic echo commands:
echo "Hello world" > /tmp/log.txt
vs
echo "Hello world" > /tmp/log/txt &
Any help would be greatly appreciated.