#!/bin/sh

# PROVIDE: ser2net
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable ser2net:
# ser2net_enable="YES"
# ser2net_flags="<set as needed>"

. /etc/rc.subr

name="ser2net"
rcvar=ser2net_enable
command="%%PREFIX%%/sbin/ser2net"

load_rc_config $name
: ${ser2net_enable="NO"}
: ${ser2net_pidfile="/var/run/ser2net.pid"}

start_cmd="$command -P ${ser2net_pidfile} $ser2net_flags"

run_rc_command "$1"
