簡體   English   中英

systemd找不到我的.service文件

[英]systemd not finding my .service file

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. 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 ,它仍然無法正常工作,感謝您的幫助:)

game.service應該放在/etc/systemd/system/game.service中

如果您將服務文件命名為game.service,則應使用systemctl start game.service將其激活。

另一個建議:將您創建的所有服務文件放在/ etc / system / system / lib / systemd / system中,以供系統單元使用。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM