#!/bin/sh
#
# $NetBSD: privoxy.sh,v 1.7 2025/05/29 13:24:48 khorben Exp $
#
# Startup script for privoxy
#
# PROVIDE: privoxy
# REQUIRE: DAEMON
#
# You will need to set some variables in /etc/rc.conf to start privoxy:
#
# privoxy=YES

$_rc_subr_loaded . /etc/rc.subr

name="privoxy"
rcvar=$name
command="/usr/pkg/sbin/${name}"
pidfile="/var/run/${name}.pid"
pconfig="/usr/pkg/etc/privoxy/config"
puser="privoxy"
required_files="$pconfig"
command_args="--pidfile ${pidfile} --user ${puser} ${pconfig} 2>/dev/null"

load_rc_config $name
run_rc_command "$1"
