github.com/Cloud-Foundations/Dominator@v0.3.4/scripts/list-methods (about)

     1  #! /bin/bash --posix
     2  
     3  set -eu
     4  
     5  endpoint='listMethods'
     6  if [ "$1" == '-public' ]; then
     7      endpoint='listPublicMethods'
     8      shift
     9  fi
    10  
    11  WGET='wget -q -O -'
    12  
    13  if [ -z "$(which wget)" ]; then
    14      WGET='curl'
    15  fi
    16  $WGET "http://$1/_goSRPC_/$endpoint" && exit
    17  rc="$?"
    18  echo "Error getting list of methods"
    19  exit "$rc"