#!/bin/sh

# PROVIDE: tinyproxy
# REQUIRE: LOGIN

#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable tinyproxy:
# tinyproxy_enable (bool): Set to "NO" by default.
#                          Set it to "YES" to enable tinyproxy 
# tinyproxy_config (path): Set to "/usr/local/etc/tinyproxy.conf" by default.
#

. /etc/rc.subr

name="tinyproxy"
rcvar=`set_rcvar`

load_rc_config $name

: ${tinyproxy_enable="NO"}
: ${tinyproxy_config="/usr/local/etc/tinyproxy.conf"}

command=/usr/local/sbin/tinyproxy
command_args="-c $tinyproxy_config 2> /dev/null"

run_rc_command "$1"
