systemd 配置文件问题

2016-09-04 23:03:43 +08:00
 webcjz
困扰一个晚上了= =求大神搭救

我要用 systemd 来守候一个进程,配置文件是这样写的:

[Unit]
Description=test

[Service]
ExecStart=/root/test/test
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

运行 systemctl start test 后报错提示:
"open config.conf: no such file or directory"

test 目录下还有个 config.conf ,是 test 程序的配置文件

有大神有经验吗谢谢!
2382 次点击
所在节点    Linux
2 条回复
billlee
2016-09-04 23:17:28 +08:00
WorkingDirectory=/root/test/test
webcjz
2016-09-04 23:23:46 +08:00
@billlee 完美解决,感谢!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/303898

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX