From b3ce8fa3a2ea374b39fc12aa7fa1b099c996edd0 Mon Sep 17 00:00:00 2001 From: jow Date: Sat, 20 Nov 2010 21:26:19 +0000 Subject: [PATCH] [packages] tinyproxy: set default stathost to 127.0.0.1 git-svn-id: svn://svn.openwrt.org/openwrt/packages@24050 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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.11.0