Suppress errors in output

This commit is contained in:
Dylan 2016-03-31 19:43:11 +11:00
parent 4da69c6f40
commit 2d9764baff

View file

@ -1633,11 +1633,11 @@ getpublicip () {
fi fi
if [ -z "$publicip" ] && type -p curl >/dev/null 2>&1; then if [ -z "$publicip" ] && type -p curl >/dev/null 2>&1; then
publicip="$(curl --max-time 10 -w '\n' "$public_ip_host")" publicip="$(curl --max-time 10 -w '\n' "$public_ip_host" 2>/dev/null)"
fi fi
if [ -z "$publicip" ] && type -p wget >/dev/null 2>&1; then if [ -z "$publicip" ] && type -p wget >/dev/null 2>&1; then
publicip="$(wget -T 10 -qO- "$public_ip_host"; printf "%s")" publicip="$(wget -T 10 -qO- "$public_ip_host" 2>/dev/null; printf "%s")"
fi fi
} }