Commit Graph

2 Commits

Author SHA1 Message Date
DQ 4afc0edbe3 Update external-ip.sh, only output on success
change sed pattern to only match when GetExternalIPAaddress succeeds and output nothing if it fails

$ upnpc -s | grep ExternalIPAddress | sed 's/[^0-9\.]//g'
.3
$ upnpc -s | grep ExternalIPAddress 
GetExternalIPAddress failed. (errorcode=-3)
$ upnpc -s | sed -n -e 's/^ExternalIPAddress = \([0-9.]*\)$/\1/p'
$
2017-09-28 15:14:22 -07:00
Thomas Bernard c183a72c46 Added miniupnpc 2011-09-27 22:25:35 +02:00