diff --git a/privoxy/scripts/start.sh b/privoxy/scripts/start.sh index 8201d6dd38..892c09a4dc 100755 --- a/privoxy/scripts/start.sh +++ b/privoxy/scripts/start.sh @@ -27,7 +27,7 @@ set_port() # Set the port for the IPv4 interface adr=$(ip -4 a show eth0| grep -oP "(?<=inet )([^/]+)") adr=${adr:-"0.0.0.0"} - sed -i -E "s/^listen-address\s+127.*/listen-address ${adr}:$1/" "$2" + sed -i -E "s/^listen-address\s+.*/listen-address ${adr}:$1/" "$2" # Remove the listen-address for IPv6 for now. IPv6 compatibility should come later sed -i -E "s/^listen-address\s+\[\:\:1.*//" "$2" diff --git a/scripts/healthcheck.sh b/scripts/healthcheck.sh index 8c5646c50f..bb431e8645 100755 --- a/scripts/healthcheck.sh +++ b/scripts/healthcheck.sh @@ -59,7 +59,7 @@ if [[ ${WEBPROXY_ENABLED} =~ [yY][eE]?[Ss]?|[tT][Rr][Uu][eE] ]]; then if [[ ${PROXY} -eq 0 ]]; then echo "Privoxy warning: process was stopped, restarting." fi - proxy_ip=$(grep -oP "(?<=^listen-address).*$" /etc/privoxy/config | sed 's/ //g') + proxy_ip=$(grep -oP "(?<=^listen-address )[0-9\.]+" /etc/privoxy/config) cont_ip=$(ip -j a show dev eth0 | jq -r .[].addr_info[].local) if [[ ${proxy_ip} != ${cont_ip} ]]; then echo "Privoxy error: container ip (${cont_ip} has changed: privoxy listening to ${proxy_ip}, restarting privoxy."