I'm currently working with piCore13.03 and I'm running into an issue getting a python script to launch at system startup.
So far, I've attempted to get the script to run from /opt/bootlocal.sh a variety of ways:
/path/to/py3 /path/to/script.py
(^ for some reason, I can't write python3 up there without the post failing)
and
python3 /path/to/script.py
I've tried adding in the sleep command before the call, like:
sleep 5
/path/to/py3 /path/to/script.py
I've tried placing the script in the /opt/ directory, as well as in /home/tc/.
I was able to get it to start when placing it in /home/tc/.profile - but it seems to execute once during startup, and again when I ssh into the machine. This isn't a deal breaker for my use, but it feels like the wrong way to do it.
Any other tips or things I can try to get this launching out of bootlocal.sh? Or maybe somewhere else I should give a try?
I should also note, the python script has to be run as sudo, so bootlocal.sh should be fine.
Thanks!