#!/bin/sh
#
# $FreeBSD: ports/net/redir/files/redir.in,v 1.3 2006/04/03 04:33:22 mnag Exp $
#
# PROVIDE: redir
# REQUIRE: DAEMON
#
# Add the following lines to /etc/rc.conf to enable redir:
#
# redir_enable (bool): Set it to "YES" to enable redir.
# Default is "NO".
# redir_flags (flags): Set flags to redir.
# Default is "". see redir(1).
# Example: "--lport=80 --cport=3128 --syslog"
#
. /etc/rc.subr
name="redir"
rcvar=${name}_enable
load_rc_config $name
: ${redir_enable="NO"}
command=/usr/local/bin/redir
command_args="&"
start_precmd="${name}_flags_check"
redir_flags_check()
{
if [ "${redir_flags}" = "" ]; then
err 1 "\$redir_flags are required. see available options in redir(1)"
fi
}
run_rc_command "$1"
syntax highlighted by Code2HTML, v. 0.9.1