ports/74210: port www/privoxy needs an example startup/shutdown script
solsTiCe at tethys.example.org
solsTiCe at tethys.example.org
Sun Nov 21 19:00:46 UTC 2004
>Number: 74210
>Category: ports
>Synopsis: port www/privoxy needs an example startup/shutdown script
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Nov 21 19:00:45 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: solsTiCe d'Hiver
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD tethys.example.org 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Tue Nov 16 22:22:22 CET 2004 root at tethys.example.org:/usr/src/sys/i386/compile/MONNOYAU i386
>Description:
When you install www/privoxy's port, there is no example of a
startup/shutdown script to start and stop and restart privoxy.
>How-To-Repeat:
install the privoxy's port
>Fix:
include in the port a script like the one below and put it in
/usr/local/share/examples/etc/rc.d or somewhere else.
--- privoxy begins here ---
#!/bin/sh
#
#
# PROVIDE: privoxy
# REQUIRE: NETWORKING
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
# SET THEM IN THE /etc/rc.conf FILE
#
privoxy_enable=${privoxy_enable-"NO"}
privoxy_flags=${privoxy_flags-""}
privoxy_pidfile=${privoxy_pidfile-"/var/run/privoxy.pid"}
. /etc/rc.subr
name="privoxy"
rcvar=`set_rcvar`
command="/usr/local/sbin/privoxy"
stop_cmd="privoxy_stop"
start_cmd="privoxy_start"
pidfile="${privoxy_pidfile}"
configfile=/usr/local/etc/privoxy/config
privoxy_start()
{
if [ -f ${pidfile} ] ;then
echo "${name} is already running"
else
echo "Starting ${name}."
${command} ${privoxy_flags} ${configfile} --pidfile ${pidfile} \
1>/dev/null 2>&1
fi
}
privoxy_stop()
{
if [ ! -f ${pidfile} ] ;then
echo "${name} is not running"
else
kill -9 `cat ${pidfile}`
rm -f ${pidfile}
echo "${name} stopped"
fi
}
load_rc_config $name
run_rc_command "$1"
--- privoxy ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list