aboutsummaryrefslogtreecommitdiff
path: root/www/squid26/files/squid.sh
diff options
context:
space:
mode:
authorSergei Kolobov <sergei@FreeBSD.org>2004-10-13 09:43:48 +0000
committerSergei Kolobov <sergei@FreeBSD.org>2004-10-13 09:43:48 +0000
commitfddce0995ad68da70e2c2e26557876d368984cdd (patch)
treed8327ac280de887b5ba394c31af21531191bd07a /www/squid26/files/squid.sh
parentfb30a982219022c29062c43fdb7af08179c0150d (diff)
- Update to 2.5-STABLE7; this release fixes a security issue regarding
the SNMP module - Remove a patch that is now part of the distribution - Miscellaneuous small fixes: + in squid.sh, make stop_command poll for the squid processes' exit in the rcNG case too; this eliminates the need to do this in restart_command + make the information regarding rcNG'ness in pkg-install easier to read + install unstripped binaries if WITH_SQUID_STACKTRACES is defined PR: ports/72581 Submitted by: Thomas-Martin Seck (maintainer)
Notes
Notes: svn path=/head/; revision=119195
Diffstat (limited to 'www/squid26/files/squid.sh')
-rw-r--r--www/squid26/files/squid.sh24
1 files changed, 14 insertions, 10 deletions
diff --git a/www/squid26/files/squid.sh b/www/squid26/files/squid.sh
index db49ae683c01..a46c9dc7bf4d 100644
--- a/www/squid26/files/squid.sh
+++ b/www/squid26/files/squid.sh
@@ -22,20 +22,28 @@ 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"
+stop_cmd="squid_stop"
squid_chdir=${squid_chdir:-%%PREFIX%%/squid/logs}
squid_enable=${squid_enable:-"NO"}
squid_flags=${squid_flags-"-D"}
squid_user=${squid_user:-%%SQUID_UID%%}
default_config=%%PREFIX%%/etc/squid/squid.conf
+# --begin rcold
+squid_stop() {
+ echo -n " ${name}"
+ ${command} -k shutdown
+ while ps -xcU ${squid_user} | grep -q squid; do
+ sleep 2
+ done
+}
+
+# --end rcold
# --begin rcng
-squid_restart() {
- run_rc_command stop
+squid_stop() {
+ ${command} -k shutdown
run_rc_command poll
- run_rc_command start
}
. %%RC_SUBR%%
@@ -66,14 +74,10 @@ start)
;;
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
;;