diff --git a/README.md b/README.md index 451f0e266ba99bc1ed14520a5fc13063ab89364a..fdad776ee3dc69d169d3f5a7260ba0afd1ef339c 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,26 @@ Institute for Medical Education; University of Bern ## Installation -* Execute a git pull of the repository url or download and extract the files somewhere in your filesystem +### Get the code + +Execute a git clone of the repository url or download and extract the files somewhere in your filesystem + +```shell +cd ~/scripts + +# get sources +git clone https://git-repo.iml.unibe.ch/iml-open-source/infoblox-dns-helperscripts.git + +# go into the newly created directory +cd infoblox-dns-helperscripts +``` + +If you can't use git then go to <https://git-repo.iml.unibe.ch/iml-open-source/infoblox-dns-helperscripts/-/tree/master> and download an archive in the wanted format. The download button is on top right of the table with file entries. + +### Setup api url and credentials + * copy inc_ib_config.sh.dist to inc_ib_config.sh -* edit inc_ib_config.sh and enter hsotname of server with API and the credentials to access it +* edit inc_ib_config.sh and enter hostname of server with API and the credentials to access it ## Usage @@ -29,7 +46,7 @@ Search for aliases and hosts. ```text ./dns-search.sh ->>>>>>>>>> INFOBLOX DNS SEARCH v1.5 +>>>>>>>>>> INFOBLOX DNS SEARCH v1.6 Search for hostnames or aliases in Infoblox API It uses dns-api.sh and adds the return field for aliases. @@ -76,15 +93,16 @@ written to STDERR. To hide them add a 2>/dev/null to hide the comments. ```txt > ./dns-search.sh www.iml.unibe.ch ; -; >>>>>>>>>> INFOBLOX DNS SEARCH v1.5 +; >>>>>>>>>> INFOBLOX DNS SEARCH v1.6 ; ; search for type : ; search regex : www.iml.unibe.ch ; -; === DNS API :: GET /record:host?name~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl +; === DNS API :: GET /record:host?name~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl,comment [ { "_ref": "record:host/REFID:www.iml.unibe.ch/default", + "comment": "", "aliases": [ ... ], @@ -102,9 +120,9 @@ written to STDERR. To hide them add a 2>/dev/null to hide the comments. "view": "default" } ] -; === DNS API :: GET /record:host?alias~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl +; === DNS API :: GET /record:host?alias~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl,comment [] -; === DNS API :: GET /record:host?ipv4addr~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl +; === DNS API :: GET /record:host?ipv4addr~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl,comment [] ; === DNS API :: GET /record:cname?name~=www.iml.unibe.ch&_return_fields%2B=ttl [] @@ -175,3 +193,12 @@ As an additional information for show_ttl.sh: how to get the default TTL? } ] ``` + +## Update scripts + +Go into your installation directory and perform git pull. + +```shell +cd ~/scripts/infoblox-dns-helperscripts +git pull +```