diff options
Diffstat (limited to 'www/squid/files/squid.sh')
-rw-r--r-- | www/squid/files/squid.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/www/squid/files/squid.sh b/www/squid/files/squid.sh index db49ae6..a46c9dc 100644 --- a/www/squid/files/squid.sh +++ b/www/squid/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 ;; |