diff options
author | tv <tv@krebsco.de> | 2015-05-20 21:58:59 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-05-20 21:58:59 +0200 |
commit | e554c6a96718235a50d979daf2be1a8f41f3a2b5 (patch) | |
tree | 5a2ae5f940941d76320c3dd6e43417103c940be1 /lib | |
parent | fc870549e7bb85d1482877784853d31e39a6fe09 (diff) |
lib/cac.sh: add cac_getserver_by_servername
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cac.sh | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,15 @@ . ./lib/url.sh + +cac_getserver_by_servername() {( + serverlist=$(cac_listservers) + echo $serverlist \ + | jq \ + --arg name "$1" \ + '.[]|select(.servername==$name)' +)} + + cac_listservers() {( listservers=$(_cac_get_api_v1 listservers) status=$(echo "$listservers" | jq -r .status) |