运行 python Intel Galileo 后台启动程序

Run python program on startup in background on Intel Galileo

我有一个 python 程序,它是一个无限循环并向我的数据库发送一些数据。

我希望这个 python 脚本在我为 Intel Galileo 供电时 运行。我尝试制作一个 sh 脚本 python myprogram.py 并在 etc/init.d 中启动时将其设为 运行。当我重新启动 Galileo 时,什么也没发生——Linux 没有加载,Arduino sketch 没有加载,甚至我的电脑也没有识别它。

我猜这是因为 python 程序是一个无限循环。 有没有一种方法可以 运行 我的系统没有问题 运行 我的 python 启动脚本?

我用 python myprogram.py & 在后台制作了 myprogram.py 运行 并且它起作用了。 & 用于 运行 您想要在后台进行的任何进程。