github.com/Cloud-Foundations/Dominator@v0.3.4/scripts/get-remote-hostname (about) 1 #! /bin/bash --posix 2 3 set -eu 4 5 endpoint='getHostname' 6 7 WGET='wget -q -O -' 8 9 if [ -z "$(which wget)" ]; then 10 WGET='curl' 11 fi 12 $WGET "http://$1/_goSRPC_/$endpoint" && exit 13 rc="$?" 14 echo "Error getting remote hostname" 15 exit "$rc"