#!/bin/sh

# PROVIDE: frps
# REQUIRE: DAEMON NETWORKING
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable frps:
# frps_enable : set to "YES" to enable the daemon, default is "NO"

. /etc/rc.subr

name=frps
rcvar=frps_enable

load_rc_config $name

frps_enable=${frps_enable:-"NO"}

logfile="/var/log/${name}.log"

procname=/usr/local/bin/frps
command="/usr/sbin/daemon"
command_args="-u nobody -o ${logfile} -t ${name} /usr/local/bin/frps -c /usr/local/etc/frps.ini"

run_rc_command "$1"
