summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cac.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/cac.sh b/lib/cac.sh
index 482e4ddea..c78576ebf 100644
--- a/lib/cac.sh
+++ b/lib/cac.sh
@@ -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)