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
但仍然无效,
任何帮助表示赞赏:)
答案 0 :(得分:1)
game.service应放在/etc/systemd/system/game.service
中答案 1 :(得分:0)
如果您将服务文件命名为game.service,则应使用systemctl start game.service
另一个建议:将您在/ etc / system / system / lib / systemd / system中创建的所有服务文件保留给系统单元。
然后执行systemctl daemon-reload && systemctl start game.service