Commit 7bb0ff98 authored by Bjarne Saltbaek's avatar Bjarne Saltbaek
Browse files

First jq rework - 11. redo

parent f3cfef40
...@@ -144,8 +144,8 @@ _findentry() { ...@@ -144,8 +144,8 @@ _findentry() {
_debug "In _findentry" _debug "In _findentry"
#returns id of dns entry, if it exists #returns id of dns entry, if it exists
_myget "json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&domain=$_domain" _myget "json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&domain=$_domain"
jqquery=".cpanelresult.data[] | select(.name == \"$fulldomain.\")| {Line} | .Line" _jqquery=".cpanelresult.data[] | select(.name == \"$fulldomain.\")| {Line} | .Line"
_id=$(echo "$_result" | jq "$jqquery") _id=""
_debug "_result is: $_result" _debug "_result is: $_result"
_debug "fulldomain. is $fulldomain." _debug "fulldomain. is $fulldomain."
_debug "_id is: $_id" _debug "_id is: $_id"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment