V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
webcjz
V2EX  ›  Linux

systemd 配置文件问题

  •  
  •   webcjz ·
    webcjz · 2016-09-04 23:03:43 +08:00 · 2376 次点击
    这是一个创建于 2790 天前的主题,其中的信息可能已经有所发展或是发生改变。
    困扰一个晚上了= =求大神搭救

    我要用 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 程序的配置文件

    有大神有经验吗谢谢!
    2 条回复    2016-09-04 23:23:46 +08:00
    billlee
        1
    billlee  
       2016-09-04 23:17:28 +08:00   ❤️ 1
    WorkingDirectory=/root/test/test
    webcjz
        2
    webcjz  
    OP
       2016-09-04 23:23:46 +08:00
    @billlee 完美解决,感谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5243 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 09:27 · PVG 17:27 · LAX 02:27 · JFK 05:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.