Add squid4 package version 4.9 based on wip/squid4 package. Squid is a fully-featured HTTP/1.0 proxy with partial HTTP/1.1 support The 4 series brings many new features and upgrades to the basic networking protocols. A short list of the major new features is: Squid 4 represents a new feature release above 3.5. The most important of these new features are: * Configurable helper queue size * Helper concurrency channels changes * SSL support removal * Helper Binary Changes * Secure ICAP * Improved SMP support * Improved process management * Initial GnuTLS support * ESI Custom Parser removal
74 lines
1.5 KiB
Bash
74 lines
1.5 KiB
Bash
#!@RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: squid.sh,v 1.1 2020/01/04 10:57:18 taca Exp $
|
|
#
|
|
# PROVIDE: squid
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
|
|
if [ -f /etc/rc.subr ]; then
|
|
. /etc/rc.subr
|
|
fi
|
|
|
|
: ${squid_conf:=@PKG_SYSCONFDIR@/squid.conf}
|
|
|
|
name="squid"
|
|
rcvar=$name
|
|
command="@PREFIX@/sbin/${name}"
|
|
pidfile="@VARBASE@/run/${name}.pid"
|
|
required_files="${squid_conf} @PKG_SYSCONFDIR@/mime.conf"
|
|
command_args="-Y -f ${squid_conf}"
|
|
|
|
start_precmd='setproclimits'
|
|
|
|
setproclimits()
|
|
{
|
|
local climit
|
|
climit=`ulimit -n`
|
|
if [ "$climit" -lt 4096 ]; then
|
|
ulimit -n 4096
|
|
fi
|
|
}
|
|
|
|
# Note: 'shutdown' waits 30 seconds, while 'interrupt' stops immediately
|
|
reload_cmd="${command} ${squid_flags} ${command_args} -k reconfigure"
|
|
rotate_cmd="${command} ${squid_flags} ${command_args} -k rotate"
|
|
createdirs_cmd="${command} ${squid_flags} ${command_args} -z"
|
|
extra_commands="createdirs reload rotate"
|
|
|
|
if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]; then
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|
|
else
|
|
if [ -f /etc/rc.conf ]; then
|
|
. /etc/rc.conf
|
|
fi
|
|
case $1 in
|
|
start)
|
|
start_cmd="${command} ${squid_flags} ${command_args}"
|
|
if [ -x ${command} -a -f ${squid_conf} ] ; then
|
|
${start_cmd}
|
|
fi
|
|
;;
|
|
stop)
|
|
${stop_cmd}
|
|
;;
|
|
createdirs)
|
|
${createdirs_cmd}
|
|
;;
|
|
reload)
|
|
if [ -r "${pidfile}" ] ; then
|
|
${reload_cmd}
|
|
fi
|
|
;;
|
|
rotate)
|
|
if [ -r "${pidfile}" ] ; then
|
|
${rotate_cmd}
|
|
fi
|
|
;;
|
|
*)
|
|
@ECHO@ "Usage: $0 {start|stop|reload|rotate|createdirs}" 1>&2
|
|
exit 64
|
|
;;
|
|
esac
|
|
fi
|