chiehming Posted June 13, 2018 Posted June 13, 2018 How to run a python script at startup on orange pi zero? Thx!
pfeerick Posted June 13, 2018 Posted June 13, 2018 How about creating/editing /etc/rc.local and running script from there? i.e. Something like #!/bin/bash python <name of script> & exit 0 Make sure that /etc/rc.local is executable (sudo chmod +x /etc/rc.local) and it'll be picked up and run when you reboot.
berbec Posted June 20, 2018 Posted June 20, 2018 On 6/13/2018 at 6:01 AM, pfeerick said: How about creating/editing /etc/rc.local and running script from there? i.e. Something like #!/bin/bash python <name of script> & exit 0 Make sure that /etc/rc.local is executable (sudo chmod +x /etc/rc.local) and it'll be picked up and run when you reboot. One small thing to remember about the rc.local script: It *must* exit successfully. So the last line, as in the above script exit 0 must be present and the last line. I just wanted to make sure one didn't remove it - it can be a gotcha!
Recommended Posts