Skip to content

Commit

Permalink
get-repo-hosts: print only the first output line; check .osg-htc.org …
Browse files Browse the repository at this point in the history
…names as well; tweak formatting
  • Loading branch information
matyasselmeci committed Jul 20, 2024
1 parent af3a299 commit 7008550
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions check-scripts/get-repo-hosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

command -v nslookup &>/dev/null || { echo >&2 "nslookup not found"; exit 127; }

for host in repo repo-rsync repo-itb; do
realname=$(nslookup ${host}.opensciencegrid.org | awk '/^Name:/ { print $2 }')
for host in {repo,repo-rsync,repo-itb}.{opensciencegrid.org,osg-htc.org}; do
realname=$(nslookup ${host} | awk '/^Name:/ { print $2; exit }')
realname=${realname:-NOTFOUND}
printf "%15s %s\n" "$host" "$realname"
printf "%31s %31s\n" "$host" "$realname"
done

0 comments on commit 7008550

Please sign in to comment.