comparison .ssh/athome @ 271:e7e331a51f2c

Just remove the -s option since we're redirecting anyway
author Steve Huston <huston@princeton.edu>
date Thu, 25 Apr 2024 13:59:42 -0400
parents 6dc992e4fc4a
children
comparison
equal deleted inserted replaced
270:6dc992e4fc4a 271:e7e331a51f2c
18 MYIP=`curl -s checkip.amazonaws.com` 18 MYIP=`curl -s checkip.amazonaws.com`
19 19
20 # Now how to get the home IP.. let's loop through ways it's possible 20 # Now how to get the home IP.. let's loop through ways it's possible
21 HOMEDNS="b6800200.eero.online" 21 HOMEDNS="b6800200.eero.online"
22 22
23 if which -s getent awk > /dev/null 2>&1 ; then 23 if which getent awk > /dev/null 2>&1 ; then
24 HOMEIP=`getent ahostsv4 $HOMEDNS | awk '{print $1; exit}'` 24 HOMEIP=`getent ahostsv4 $HOMEDNS | awk '{print $1; exit}'`
25 elif which -s dig > /dev/null 2>&1 ; then 25 elif which dig > /dev/null 2>&1 ; then
26 HOMEIP=`dig +short $HOMEDNS` 26 HOMEIP=`dig +short $HOMEDNS`
27 else 27 else
28 exit $off 28 exit $off
29 fi 29 fi
30 30