【问题标题】:Auto startup my source code in ubuntu在 ubuntu 中自动启动我的源代码
【发布时间】:2016-07-26 12:56:44
【问题描述】:

我的 python 源文件在我启动系统时自动启动。我试过init.d 和其他一些shell 脚本,但它不起作用。注意(我也制作了可执行文件),但它不起作用。

请帮忙。

【问题讨论】:

    标签: linux python-2.7 ubuntu-14.04


    【解决方案1】:

    还有许多其他帖子涉及此主题,特别是 here

    将其放入 /etc/init (在 Ubuntu 15.x 中使用 /etc/systemd) mystartupscript.conf 在运行级别开始 [2345] 在运行级别停止 [!2345] exec /path/to/script.py 通过将这个 conf 文件放在那里,您可以连接到 ubuntu 的 upstart 服务,该服务在启动时运行服务。 使用 sudo service mystartupscript start 和 sudo service mystartupscript stop 完成手动启动/停止

    还有另一种解决方案here also

    【讨论】:

      猜你喜欢
      • 2014-04-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-30
      • 2020-02-26
      • 1970-01-01
      • 2018-11-29
      相关资源
      最近更新 更多