0

我正在尝试使用 systemctl 启动单声道程序。我的 .service 看起来像这样:

[Unit]
Description=Starts results sender
After=network.target systemd.mount

[Service]
Type=forking
ExecStart=/usr/bin/mono /home/ubuntu/CameraInfoSender/CameraInfoSender.exe

,但(code=exited, status=0/SUCCESS)在做任何工作之前,它会立即以 , 退出。此命令在手动启动时有效。添加Retart=on-success没有帮助,WantedBy. 任何帮助将不胜感激。

4

1 回答 1

2

检查您是否使用了适当的Type=. Type=选项记录在man systemd.service.

还要检查为什么事情在 shell 中运行而不是通过 systemd的常见问题解答。

于 2017-05-30T14:07:56.160 回答