2017-07-14 197 views
0

systemd沒有找到我的。服務文件systemd找不到我的。服務文件

[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

如果您命名您的服務器ice file game.service,那麼應該使用systemctl start game.service

激活另一個建議:把你創建的所有服務文件放在/ etc/system/system/lib/systemd/system中保留給系統單元。

然後做一個systemctl daemon-reload && systemctl start game.service