Add: openrc
This commit is contained in:
parent
fd336a5503
commit
fe29b3ed9c
38
conf/openrc/frpc.sh
Executable file
38
conf/openrc/frpc.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/run/frpc.pid"
|
||||
configfile="/etc/frp/frpc.ini"
|
||||
command="/usr/bin/frpc"
|
||||
command_opts=" -c $configfile"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
need localmount
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting frpc"
|
||||
start-stop-daemon --start --background \
|
||||
--exec $command \
|
||||
-- $command_opts \
|
||||
--make-pidfile --pidfile $pidfile
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping frpc"
|
||||
start-stop-daemon --stop \
|
||||
--exec $command \
|
||||
--pidfile $pidfile
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading frpc"
|
||||
start-stop-daemon --exec $command \
|
||||
--pidfile $pidfile \
|
||||
-s 1
|
||||
eend $?
|
||||
}
|
38
conf/openrc/frps.sh
Executable file
38
conf/openrc/frps.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/run/frps.pid"
|
||||
configfile="/etc/frp/frps.ini"
|
||||
command="/usr/bin/frps"
|
||||
command_opts=" -c $configfile"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
need localmount
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting frps"
|
||||
start-stop-daemon --start --background \
|
||||
--exec $command \
|
||||
-- $command_opts \
|
||||
--make-pidfile --pidfile $pidfile
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping frps"
|
||||
start-stop-daemon --stop \
|
||||
--exec $command \
|
||||
--pidfile $pidfile
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading frps"
|
||||
start-stop-daemon --exec $command \
|
||||
--pidfile $pidfile \
|
||||
-s 1
|
||||
eend $?
|
||||
}
|
Loading…
Reference in New Issue
Block a user