【问题标题】:systemd not finding my .service filesystemd 找不到我的 .service 文件
【发布时间】:2017-07-14 13:59:22
【问题描述】:

systemd 找不到我的 .service 文件

[Unit]
Description=Game Server
[Service]
Type=simple
User=steam
Group=steam
Restart=on-failure
ExecStop=killall -TERM srcds_linux
[Install]
WantedBy=multi-user.target

它保存在/lib/systemd/system/game.service

当我systemctl start csgo.service 它说Unit csgo.service failed to load: No such file or directory. See system logs and 'systemctl status csgo.service' for details.

我已经完成了systemctl --system daemon-reload,但它仍然无法正常工作, 任何帮助表示赞赏:)

【问题讨论】:

    标签: ubuntu systemd steam lib systemctl


    【解决方案1】:

    game.service 应该放在 /etc/systemd/system/game.service

    【讨论】:

      【解决方案2】:

      如果您将服务文件命名为 game.service,则应使用 systemctl start game.service 激活它

      另一个建议:将您创建的所有服务文件放入 /etc/system/system /lib/systemd/system 为系统单元保留。

      然后做一个systemctl daemon-reload && systemctl start game.service

      【讨论】:

        猜你喜欢
        • 2016-04-02
        • 1970-01-01
        • 1970-01-01
        • 2019-07-02
        • 2020-12-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多