Search code examples
pythonlinuxstartupintel-galileo

Run python program on startup in background on Intel Galileo


I have a python program that is an infinity loop and send some data to my database.

I want this python script to run when I power my Intel Galileo. I tried to make a sh script python myprogram.py and made it run on startup in etc/init.d. When I restarted my Galileo, nothing happened-Linux didn't load, Arduino sketch didn't load and even my computer didn't recognize it.

I guess this happened because the python program was an infinity loop. Is there a way that I can run my system without problems and run my python script on startup?


Solution

  • I made the myprogram.py run in background with python myprogram.py & and it worked. The & is used to run whatever process you want in background.