Skip to content

BashPlus for Dyn

monstruooo edited this page May 7, 2017 · 24 revisions

This page is still under construction

Summary:


Getting started with bash+

You start by sourcing files with bash+ functions

Once you have the functions in your shell and you run the first DynDNS command (any command), you will be prompted for credentials. These are saved as variables inside your shell until you leave the current session


Listing/Searching/Creating domains

You can list all domains in your account with the command dyn ls

Now lets create a new domain. Notice the use of grep to filter domains. Bash+ is still bash. You are working with DynDNS in shell


Creating records

Next, we populate the newly created domain with some records.

Creating a naked A record

Creating a cname

Created a naked text record and listing that record by its id to see all its values


Updating existing records

You can also update existing records, using the same command dyn record mk

Updating naked records is more tricky. You should incorporate the record id in your command. You do it using a special /@ notation

You can use / notation to update normal records too. This would make your commands run faster when updating existing records


Listing/filtering domain records

You have four ways to list records:

  • dyn ls <domain> lists records but without values. Fast
  • dyn ls <domain> all lists all records with their values. Takes time.
  • dyn ls <domain> naked lists all naked records with values
  • dyn ls <domain> id1 id2 id3


Deleting domains/records

To delete records, run dyn rm <domain> <record1 id> <record2 id> ... Multiple records can be specified at the same time

To delete domain, run dyn domain rm . For example dyn domain rm oskar-test.com

This command asks for confirmation. In case you are running it in a script, use regular bash redirection to simulate user input


Custom API requests

The command “record add” above can process records of the type A, CNAME and TXT. It doesn’t work with MX or SRV records. However, you can take advantage of bash+ functions to easily create your own requests to the API.

Bash+ has function dyn_api to access API that can be also evoked as dyn api

Clone this wiki locally