diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-12 21:55:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-12 21:55:15 +0000 |
commit | 7218e1b46bceac05841e90472501742d905fb3fc (patch) | |
tree | 56fae051db521b8fce8014cbc8b11484885b14b3 /net-vpn/fp-multiuser/files/initd | |
parent | 6d691ad5b6239929063441bbd14c489e92e7396e (diff) |
gentoo resync : 12.03.2021
Diffstat (limited to 'net-vpn/fp-multiuser/files/initd')
-rw-r--r-- | net-vpn/fp-multiuser/files/initd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net-vpn/fp-multiuser/files/initd b/net-vpn/fp-multiuser/files/initd new file mode 100644 index 000000000000..bd3d6343f940 --- /dev/null +++ b/net-vpn/fp-multiuser/files/initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description="frp server" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +command="/usr/bin/fp-multiuser" +command_user="fp-multiuser:fp-multiuser" +command_args="${FP_MULTIUSER_OPTS:-"-f /etc/fp-multiuser/tokens -l 127.0.0.1:7200"}" +command_background="true" +logfile=/var/log/fp-multiuser/${RC_SVCNAME}.log +start_stop_daemon_args="--user ${command_user%:*} --group ${command_user#*:} + --stdout ${logfile} --stderr ${logfile}" + +: "${supervisor:=supervise-daemon}" +: "${respawn_delay:=1}" +: "${respawn_max:=10}" +: "${respawn_period:=60}" + +depend() { + need net +} + +start() { + checkpath --directory --mode 755 --owner root "${pidfile%/*}" + checkpath --directory --mode 755 --owner "${command_user}" "${logfile%/*}" + default_start +} |