running a persistent python script from systemd?

十年热恋 提交于 2019-12-05 06:46:43

You've specified both After=default.target and WantedBy=default.target. This is not resolvable.

WantedBy specifies that the target will include this service when starting up, but After means to ensure that the named target is up before starting this service!

Most likely you do not need After=default.target and should remove this.


I also suggest you specify the service Type= explicitly. While the default is currently simple (which should work for what you're doing) older versions of systemd may have behaved differently.

[Service]
Type=simple

What about usig nohup? http://en.wikipedia.org/wiki/Nohup nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP (hangup) signal is by convention the way a terminal warns dependent processes of logout.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!