diff options
author | Chris Rees <crees@FreeBSD.org> | 2012-11-05 18:53:31 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2012-11-05 18:53:31 +0000 |
commit | 50c2ab6d9e0f6ce1439cf1051e0ab1b92317a8d9 (patch) | |
tree | 73ca34420a6ff1d43f435f54b8e1d15920446bc2 /www/squid32 | |
parent | b5ec420fc91bd2cb239d1caf550cf25794f24e68 (diff) | |
download | ports-50c2ab6d9e0f6ce1439cf1051e0ab1b92317a8d9.tar.gz ports-50c2ab6d9e0f6ce1439cf1051e0ab1b92317a8d9.zip |
Notes
Diffstat (limited to 'www/squid32')
-rw-r--r-- | www/squid32/files/squid.in | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/www/squid32/files/squid.in b/www/squid32/files/squid.in index 6768057c655e..6565dfcbcc45 100644 --- a/www/squid32/files/squid.in +++ b/www/squid32/files/squid.in @@ -40,45 +40,26 @@ # use. See squid(8) for further details. # -squid_checkrunning() { - ${command} ${command_args} ${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} ${command_args} ${squid_flags} -k shutdown - run_rc_command poll -} - . /etc/rc.subr name=squid rcvar=squid_enable +load_rc_config ${name} + +: ${squid_chdir:=/var/squid} +: ${squid_conf:=%%PREFIX%%/etc/squid/squid.conf} +: ${squid_enable:=NO} +: ${squid_fib:=NONE} +: ${squid_pidfile:=/var/run/squid/squid.pid} +: ${squid_user:=squid} + command=%%PREFIX%%/sbin/squid extra_commands=reload reload_cmd="${command} ${command_args} ${squid_flags} -k reconfigure" -start_precmd="squid_setfib" -stop_precmd="squid_checkrunning" -stop_cmd="squid_stop" - -load_rc_config ${name} - -squid_chdir=${squid_chdir:-"/var/squid"} -squid_conf=${squid_conf:-"%%PREFIX%%/etc/squid/squid.conf"} -squid_enable=${squid_enable:-"NO"} -squid_fib=${squid_fib:-"NONE"} -squid_pidfile=${squid_pidfile:-"/var/run/squid/squid.pid"} -squid_user=${squid_user:-"squid"} +start_precmd=squid_setfib +stop_precmd="${command} ${command_args} ${squid_flags} -k check 2>/dev/null" +stop_cmd=squid_stop pidfile=${squid_pidfile} procname=squid-1 @@ -94,4 +75,21 @@ required_files=${squid_conf} command_args="-f ${squid_conf}" -run_rc_command "$1" +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} ${command_args} ${squid_flags} -k shutdown + run_rc_command poll +} + +run_rc_command $1 |