diff options
-rw-r--r-- | www/squid30/Makefile | 4 | ||||
-rw-r--r-- | www/squid30/distinfo | 6 | ||||
-rw-r--r-- | www/squid30/files/pkg-install.in | 2 | ||||
-rw-r--r-- | www/squid30/files/squid.in | 53 |
4 files changed, 49 insertions, 16 deletions
diff --git a/www/squid30/Makefile b/www/squid30/Makefile index 0940c17bf95d..3d2c8b83fc23 100644 --- a/www/squid30/Makefile +++ b/www/squid30/Makefile @@ -99,9 +99,9 @@ COMMENT= HTTP Caching Proxy LATEST_LINK= squid30 -SQUID_STABLE_VER= 20 +SQUID_STABLE_VER= 21 -CONFLICTS= squid-2.[0-9].* squid-3.[^0].* cacheboy-[0-9]* +CONFLICTS= squid-2.[0-9].* squid-3.[^0].* cacheboy-[0-9]* lusca-head-[0-9]* GNU_CONFIGURE= yes USE_BZIP2= yes USE_PERL5= yes diff --git a/www/squid30/distinfo b/www/squid30/distinfo index 7c62c48cdd36..6af3790e39b8 100644 --- a/www/squid30/distinfo +++ b/www/squid30/distinfo @@ -1,3 +1,3 @@ -MD5 (squid3.0/squid-3.0.STABLE20.tar.bz2) = 9efcbdda8045d2a9eb5d9915449ef175 -SHA256 (squid3.0/squid-3.0.STABLE20.tar.bz2) = 7163b208855540e3a94e19f9e03fb6cee8cbc208515fc8e7d6b94419a7ccdf69 -SIZE (squid3.0/squid-3.0.STABLE20.tar.bz2) = 1801899 +MD5 (squid3.0/squid-3.0.STABLE21.tar.bz2) = 279168fe1fe5b38bbf6eee12babbc4ad +SHA256 (squid3.0/squid-3.0.STABLE21.tar.bz2) = 07114935b7aed9df42524e84f6a634849d4bcafd513bf118881aa5cc58911f7b +SIZE (squid3.0/squid-3.0.STABLE21.tar.bz2) = 1802875 diff --git a/www/squid30/files/pkg-install.in b/www/squid30/files/pkg-install.in index 8e87a6c545c8..4ab78f0a2ab5 100644 --- a/www/squid30/files/pkg-install.in +++ b/www/squid30/files/pkg-install.in @@ -60,7 +60,7 @@ PRE-INSTALL) if [ ! -d ${squid_confdir} ]; then echo "Creating ${squid_confdir}..." install -d -o root -g ${squid_group} \ - -m 0750 ${squid_confdir} + -m 0755 ${squid_confdir} fi ;; POST-INSTALL) diff --git a/www/squid30/files/squid.in b/www/squid30/files/squid.in index bd9483908ae6..a472cd80b4fd 100644 --- a/www/squid30/files/squid.in +++ b/www/squid30/files/squid.in @@ -8,16 +8,51 @@ # # Note: # Set "squid_enable=yes" in either /etc/rc.conf, /etc/rc.conf.local or -# /etc/rc.conf.d/squid to make this script actually do something. There -# you can also set squid_chdir, squid_pidfile, squid_user, and squid_flags. +# /etc/rc.conf.d/squid to activate Squid. # -# Please see squid(8), rc.conf(5) and rc(8) for further details. +# Additional variables you can define in one of these files: +# +# squid_chdir: the directory into which the rc system moves into before +# starting Squid. Default: %%PREFIX%%/squid +# +# squid_conf: The configuration file that Squid should use. +# Default: %%PREFIX%%/etc/squid/squid.conf +# +# squid_fib: The alternative routing table id that Squid should use. +# Default: none +# See setfib(1) for further details. Note that the setfib(2) +# system call is not available in FreeBSD versions prior to 7.1. +# +# squid_user: The user id that should be used to run the Squid master +# process. Default: %%SQUID_UID%%. +# Note that you probably need to define "squid_user=root" if +# you want to run Squid in reverse proxy setups or if you want +# Squid to listen on a "privileged" port < 1024. +# +# squid_pidfile: +# The name (including the full path) of the Squid +# master process' PID file. +# Default: %%PREFIX%%/squid/squid.pid. +# You only need to change this if you changed the +# corresponding entry in your Squid configuration. +# +# squid_flags: Additional commandline arguments for Squid you might want to +# use. See squid(8) for further details. # squid_checkrunning() { ${command} ${squid_flags} -k check 2>/dev/null } +squid_setfib() { + sysctl net.fibs >/dev/null 2>&1 || return 0 + if [ "x${squid_fib}" != "xNONE" ]; then + command="setfib -F ${squid_fib} ${command}" + else + return 0 + fi +} + squid_stop() { echo "Stopping ${name}." ${command} ${squid_flags} -k shutdown @@ -32,29 +67,27 @@ rcvar=${name}_enable command=%%PREFIX%%/sbin/squid extra_commands=reload reload_cmd="${command} ${squid_flags} -k reconfigure" +start_precmd="squid_setfib" stop_precmd="squid_checkrunning" stop_cmd="squid_stop" load_rc_config ${name} squid_chdir=${squid_chdir:-"%%PREFIX%%/squid/logs"} +squid_conf=${squid_conf:-"%%PREFIX%%/etc/squid/squid.conf"} squid_enable=${squid_enable:-"NO"} +squid_fib=${squid_fib:-"NONE"} squid_flags=${squid_flags-"-D"} squid_pidfile=${squid_pidfile:-"%%PREFIX%%/squid/logs/squid.pid"} squid_user=${squid_user:-%%SQUID_UID%%} -default_config=%%PREFIX%%/etc/squid/squid.conf pidfile=${squid_pidfile} required_dirs=${squid_chdir} -# squid(8) will not start if ${default_config} is not present so try +# squid(8) will not start if ${squid_conf} is not present so try # to catch that beforehand via ${required_files} rather than make # squid(8) crash. -# If you remove the default configuration file make sure to add -# '-f /path/to/your/squid.conf' to squid_flags -if [ -z "${squid_flags}" ]; then - required_files=${default_config} -fi +required_files=${squid_conf} run_rc_command "$1" |