-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All RR-Types , non-verbose #3
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,18 @@ A small cli-client for the InternetX AutoDNS API to update a record with an IP a | |
|
||
## Usage | ||
|
||
### Verbosity | ||
|
||
log to syslog/logger( attention , your password as well ) | ||
|
||
``` | ||
$ DEBUGSYSLOG=true ./autodns-cli update foo.example.org 127.0.0.1 | ||
``` | ||
log to STDERR | ||
``` | ||
$ DEBUGSTDERR=true ./autodns-cli update foo.example.org 127.0.0.1 | ||
``` | ||
|
||
### Configuration | ||
|
||
You need to start this with: | ||
|
@@ -21,14 +33,27 @@ $ export AUTODNS_CONTEXT=4 | |
$ export MY_ZONE=example.org | ||
``` | ||
|
||
or alternatively | ||
``` | ||
MY_ZONE=example.org AUTODNS_CONTEXT=4 AUTODNS_USER=your_login AUTODNS_PASSWORD=your_password ./autodns-cli update foo.example.org 127.0.0.1 | ||
``` | ||
|
||
|
||
Bonus points: Create an `.autodns-cli.rc` with the above. | ||
|
||
### Updating/Creating a record | ||
### Updating/Creating a DNS record ( resource record in autodns ) | ||
|
||
## BE CAREFUL AS the domain parameter might be prefixed ( e.g mydomainentry.mydomain.com) | ||
|
||
Then run with: | ||
|
||
``` | ||
$ ./autodns-cli update foo.example.org 127.0.0.1 | ||
$ ./autodns-cli update domain.com 127.0.0.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure this was intended? |
||
``` | ||
OR specify the type as last argument | ||
|
||
``` | ||
$ ./autodns-cli update _amazonses.subdomain "ASDOIJQWDQWDASD+24hjdsf23/" TXT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very cool! |
||
``` | ||
|
||
### Deleting a record | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,16 @@ declare -r prog=$(basename "$0") | |
declare -r endpoint=https://api.autodns.com/v1 | ||
declare -r ttl=120 | ||
|
||
if [ -f './.autodns-cli.rc' ]; then | ||
if [ -f '~/.autodns-cli.rc' ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you make it possibly load either? I am not sure what the best load order would be, maybe home first, then local second? |
||
# shellcheck disable=SC1091 | ||
source ./.autodns-cli.rc | ||
source ~/.autodns-cli.rc | ||
fi | ||
|
||
source ./func.sh | ||
source ./commands.sh | ||
#source ./func.sh | ||
#source ./commands.sh | ||
|
||
source $( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/func.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍🏼 Cheers! |
||
source $( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/commands.sh | ||
|
||
subcommand=$1 | ||
case $subcommand in | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.