V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
webcjz
V2EX  ›  Linux

systemd 配置文件问题

  •  
  •   webcjz ·
    webcjz · Sep 4, 2016 · 2827 views
    This topic created in 3530 days ago, the information mentioned may be changed or developed.
    困扰一个晚上了= =求大神搭救

    我要用 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 replies    2016-09-04 23:23:46 +08:00
    billlee
        1
    billlee  
       Sep 4, 2016   ❤️ 1
    WorkingDirectory=/root/test/test
    webcjz
        2
    webcjz  
    OP
       Sep 4, 2016
    @billlee 完美解决,感谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5695 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 07:39 · PVG 15:39 · LAX 00:39 · JFK 03:39
    ♥ Do have faith in what you're doing.