mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #145] 客户端无法开启自启动 #89
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#89
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 @ghsa1994 on GitHub (Oct 25, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/145
树莓派平台,无论是在rc.local中还是init.d中写脚本都是无法正常启动,服务端在vps的 Centos 6 x86上的rc.local就能成功自启动,树莓派在家里,没有保证的7*24小时供电!求协助!
@jiangchao0304 commented on GitHub (Oct 28, 2016):
自己pi用的 拿走不谢
保存为 frpc 到/etc/init.d
注册为服务 update-rc.d frpc defaults
我的frp放在/opt/frp里 根据你的目录修改
`#!/bin/sh
NAME=frpc
DAEMON=/opt/frp/$NAME
CONFIG=/opt/frp/myfrpc.ini
[ -x "$DAEMON" ] || exit 0
case "$1" in
start)
echo "Starting $NAME..."
start-stop-daemon --start --chuid pi --exec $DAEMON --quiet --oknodo --background -- -c $CONFIG || return 2
;;
stop)
echo "Stopping $NAME..."
start-stop-daemon --stop --exec $DAEMON --quiet --oknodo --retry=TERM/30/KILL/5 || return 2
;;
restart)
$0 stop && sleep 2 && $0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0
`