From b3d34be4a2dfe02fa64b1b1fa0cedcf6e75ef65c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 20 Nov 2010 21:26:19 +0000 Subject: [PATCH] tinyproxy: set default stathost to 127.0.0.1 SVN-Revision: 24050 --- net/tinyproxy/files/tinyproxy.init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/tinyproxy/files/tinyproxy.init b/net/tinyproxy/files/tinyproxy.init index f81dcd344..cff10c083 100644 --- a/net/tinyproxy/files/tinyproxy.init +++ b/net/tinyproxy/files/tinyproxy.init @@ -39,6 +39,7 @@ start_proxy() { proxy_string "$1" ErrorFile_503 "ErrorFile 503" >> $CFGFILE proxy_string "$1" DefaultErrorFile >> $CFGFILE + proxy_string "$1" StatHost StatHost 127.0.0.1 >> $CFGFILE proxy_string "$1" StatFile >> $CFGFILE proxy_string "$1" LogFile >> $CFGFILE @@ -102,8 +103,10 @@ proxy_string() { local SECTION=$1 local OPTION=$2 local ALIAS=$3 + local DEFAULT=$4 config_get _value "$SECTION" "$OPTION" + [ -z "$_value" ] && _value="$DEFAULT" [ -n "$_value" ] && echo "${ALIAS:-${OPTION}} "'"'"$_value"'"' } -- 2.30.2