mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4521] frps如何设置开机自动启动? #3571
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3571
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zql666999 on GitHub (Nov 1, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4521
Describe the feature request
frps每次开机以后,不能自动启动,已经设置过sytemctl enable frps还是不能开机自动启动,需要手动,要怎样才能自动启动?
Describe alternatives you've considered
No response
Affected area
@phil616 commented on GitHub (Nov 3, 2024):
可能是你的service文件配置出现了问题,请提供您的配置文件或者可以尝试我在下面提供的
将
/root/frp/frps替换为执行文件的位置,/root/frp/frps.toml为配置文件的位置。在https://gofrp.org/zh-cn/docs/setup/systemd/ 这里有一些简略介绍。
也可能是SELinux的问题,请参考https://github.com/fatedier/frp/issues/4350
如果是其他诸如配置文件出错或是端口问题,在以往的issue中都有提到,可以尝试在这个仓库里直接搜索相关问题。
@zql666999 commented on GitHub (Nov 4, 2024):
你好 我的配置文件如下,请帮忙找找不能启动问题出在哪里,搞了好久都不能自动启动,搞不懂怎么回事了。
Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/frps
Description=LSB: starts the frps
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=all.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/frps start
ExecStop=/etc/init.d/frps stop
@phil616 commented on GitHub (Nov 4, 2024):
这个配置文件把启动指向了/etc/init.d/frps,如果frps是一个脚本,需要检查这个脚本的正确性,如果是某个发行包的可执行文件,那么后面接的start参数无法成功识别,需要手动指向一个配置文件。如果仍然不能确定问题,可以继续提供错误日志。
建议提供所使用的发行包版本号,系统版本,具体是如何配置的,系统守护进程的启动日志和frps的日志以及frps所使用的配置文件信息。