Shorter DNS timeout

master
Mateusz Chochół 7 years ago
parent 1d061356cc
commit ea39f9f8e3
  1. 3
      bmotd.sh

@ -72,7 +72,7 @@ update() {
FQDN=$(hostname -f)
OSID=$(cat /etc/*-release 2>/dev/null | awk -F'=' '/^ID=/ { print $2; count++ } END { if (!count) print "Unknown" }')
KERNEL=$(uname -r)
EXTERNAL=$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"')
EXTERNAL=$(dig TXT +time=3 +tries=2 +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"')
# Get number of updates awaiting
test -f "$CACHEPATH/pkg_count" || PKG_REFRESH=1
@ -92,7 +92,6 @@ update() {
echo $PKG_NU > "$CACHEPATH/pkg_count"
fi
PKG_NU=$(cat $CACHEPATH/pkg_count)
# Test if /etc/motd writable and run motd generator if so
test -w $MOTD && motdGen
}

Loading…
Cancel
Save