[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
This commit is contained in:
jow 2010-11-20 21:26:19 +00:00
parent a7b1f72f6d
commit b3ce8fa3a2

View File

@ -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"'"'
}