diff options
author | sem <sem@FreeBSD.org> | 2004-09-02 14:44:14 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2004-09-02 14:44:14 +0800 |
commit | 7b57415face465e0dba5ac8df49b2579cbf881b5 (patch) | |
tree | e5181b06b2afe61829aee76cc1eef9745c9944a3 /www/squid30/files | |
parent | 8eef4ad5ab07318ee03e9fe7ff3a0ec3ef3df7a4 (diff) | |
download | freebsd-ports-gnome-7b57415face465e0dba5ac8df49b2579cbf881b5.tar.gz freebsd-ports-gnome-7b57415face465e0dba5ac8df49b2579cbf881b5.tar.zst freebsd-ports-gnome-7b57415face465e0dba5ac8df49b2579cbf881b5.zip |
Implement vendor patches for the following issues:
- try to prevent crashes of the digest helper (squid bug #1031)
- correct parsing of the acl_time directive when multiple time specifications
are given (squid bug #1060)
- correct "cachemgr config" output for http_header_* directives
(squid bug #1056)
- recognize the Content-Disposition header to be able to specify
http_header_access directives using it (squid bug #961)
See <http://www.squid-cache.org/Versions/v2/2.5/bugs/> for further
information.
Reimplement the rcNG support. See UPDATING for details.
PR: ports/71260
Submitted by: maintainer
Diffstat (limited to 'www/squid30/files')
-rw-r--r-- | www/squid30/files/squid.sh | 100 |
1 files changed, 56 insertions, 44 deletions
diff --git a/www/squid30/files/squid.sh b/www/squid30/files/squid.sh index 0888ef91b274..db49ae683c01 100644 --- a/www/squid30/files/squid.sh +++ b/www/squid30/files/squid.sh @@ -2,23 +2,28 @@ # # $FreeBSD$ # +# --begin rcng # PROVIDE: squid # REQUIRE: NETWORKING SERVERS # BEFORE: DAEMON # KEYWORD: FreeBSD shutdown # # Note: -# If you are running an rcNG-System (i.e. FreeBSD 5 and later) you need to set -# "squid_enable=YES" in either /etc/rc.conf, /etc/rc.conf.local or +# 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_user, and squid_flags. # # Please see squid(8), rc.conf(5) and rc(8) for further details. +# +# --end rcng -name="squid" +name=squid command=%%PREFIX%%/sbin/squid +# --begin rcng extra_commands=reload reload_cmd="${command} -k reconfigure" +restart_cmd=squid_restart +# --end rcng stop_cmd="${command} -k shutdown" squid_chdir=${squid_chdir:-%%PREFIX%%/squid/logs} squid_enable=${squid_enable:-"NO"} @@ -26,45 +31,52 @@ squid_flags=${squid_flags-"-D"} squid_user=${squid_user:-%%SQUID_UID%%} default_config=%%PREFIX%%/etc/squid/squid.conf -if [ -f /etc/rc.subr ]; then - # make use of rcNG features: - . /etc/rc.subr - rcvar=`set_rcvar` - load_rc_config ${name} - # squid(8) will not start if ${default_config} 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_dirs=${squid_chdir} - run_rc_command "$1" -else - # implement the startup using the "old style" for non-rcNG-systems: - case $1 in - start) - if [ -x "${command}" -a \ - \( -f "${default_config}" -o "${squid_flags}" \) ]; then - echo -n ' squid' - (cd ${squid_chdir} && exec su -fm ${squid_user} -c \ - "${command} ${squid_flags}") - fi - ;; - stop) - if [ -x "${command}" ]; then - echo -n ' squid' - ${stop_cmd} - while ps -xcU ${squid_user} | grep -q squid; do - sleep 2 - done - fi - ;; - *) - echo "usage: ${0##*/} {start|stop}" >&2 - exit 64 - ;; - esac - exit 0 +# --begin rcng +squid_restart() { + run_rc_command stop + run_rc_command poll + run_rc_command start +} + +. %%RC_SUBR%% +rcvar=`set_rcvar` +load_rc_config ${name} + +# squid(8) will not start if ${default_config} 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_dirs=${squid_chdir} +run_rc_command "$1" +# --end rcng +# --begin rcold +case $1 in +start) + if [ -x "${command}" -a \ + \( -f "${default_config}" -o "${squid_flags}" \) ]; then + echo -n " ${name}" + (cd ${squid_chdir} && exec su -fm ${squid_user} -c \ + "${command} ${squid_flags}") + fi + ;; +stop) + if [ -x "${command}" ]; then + echo -n " ${name}" + ${stop_cmd} + while ps -xcU ${squid_user} | grep -q squid; do + sleep 2 + done + fi + ;; + *) + echo "usage: ${0##*/} {start|stop}" >&2 + exit 64 + ;; +esac +exit 0 +# --end rcold |