[Others] 自定义systemd服务无法开机自启动
Tofloor
poster avatar
南柯
deepin
2025-03-27 22:23
Author

Deepin 23,自定义systemd服务无法开机自启动,Ubuntu下正常。

几个月前是没问题的。

自定义frpc如下:

image.png

Reply Favorite View the author
All Replies
deepinuser17
deepin
2025-03-27 23:17
#1

有没有运行过, sudo systemctl daemon-reload ?

查看该启动状态: systemctl status frpc.service

如果有问题,以上命令会提示。

因为这个服务要运行在个人目录下的文件, 建议添加运行用户名:

[service]
Type=simple
User=jyu
....
Reply View the author
MeGusta
deepin
2025-03-28 08:49
#2

我只看见你把

multi-user.target

写成了

multo-user.target

Reply View the author
neko
deepin
Ecological co-builder
Q&A Team
2025-03-28 15:31
#3
MeGusta

我只看见你把

multi-user.target

写成了

multo-user.target

太细节了

Reply View the author
南柯
deepin
2025-04-03 19:45
#4
MeGusta

我只看见你把

multi-user.target

写成了

multo-user.target

改过来还是不行啊

Reply View the author
南柯
deepin
2025-04-03 19:48
#5
deepinuser17

有没有运行过, sudo systemctl daemon-reload ?

查看该启动状态: systemctl status frpc.service

如果有问题,以上命令会提示。

因为这个服务要运行在个人目录下的文件, 建议添加运行用户名:

[service]
Type=simple
User=jyu
....

运行过,systemctl start可以启动,但无法开机自启动

Reply View the author
deepinuser17
deepin
2025-04-04 04:24
#6
南柯

运行过,systemctl start可以启动,但无法开机自启动

需要设置开机时启动。

sudo systemctl enable frpc.service
Reply View the author
南柯
deepin
2025-04-15 17:33
#7
deepinuser17

需要设置开机时启动。

sudo systemctl enable frpc.service

这个用过,查看多次,确定都是enable

Reply View the author
南柯
deepin
2025-04-15 17:34
#8
deepinuser17

需要设置开机时启动。

sudo systemctl enable frpc.service

好久之前是没问题的,后来就不行了,开机不能自启动。

Reply View the author