Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3 from nogasgofast/master

Ability to specifying the Client ID (required for Cloud Sites users).
  • Loading branch information...
commit bcdb4465221f89d1d4a56f5d0f1e378d902cd49f 2 parents 03724f0 + 5f427ab
@linickx linickx authored
View
12 README.md
@@ -12,6 +12,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -d domain
* -e email address
* -t TTL
@@ -33,6 +34,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -d domain
* -k use the UK (London) servers
* -h help
@@ -51,6 +53,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -n fully qualified hostname
* -i IP address
* -t TTL
@@ -77,6 +80,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -n hostname of the new CNAME
* -r the RECORD the CNAME points to
* -t TTL
@@ -103,6 +107,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -d domain name
* -i redord ID
* -k use the UK (London) servers
@@ -121,6 +126,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -d domain for the record
* -n name for the record
* -D data for the record
@@ -145,6 +151,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -d domain for the record
* -n name for the record
* -D data for the record
@@ -168,6 +175,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -d domain for the record
* -n name for the record
* -D data for the record
@@ -190,6 +198,7 @@ Options:
* -u username
* -a api key
+* -c client ID (for cloud sites users)
* -d domain for the record
* -s name of the old name server (the one you are chaning)
* -S new name server
@@ -201,6 +210,9 @@ Usage:
Currently you can only update records, this should be enough for most use cases.
`./rsdns-ns.sh -u linickx -a 123456 -d linickx.com -s dns1.stabletransit.com -S ns.example.com`
+If you are modifying a client's dns
+`./rsdns-ns.sh -u linickx -a 123456 -d linickx.com -s dns1.stabletransit.com -S ns.example.com -c 123456`
+
## The Config File ~/.rsdns_config ##
To reduce the amount of typing and to enable usage of rsdns in your $PATH, a basic config file is supported. The following Variables are supported:
View
4 lib/auth.sh
@@ -44,7 +44,9 @@ function get_auth () {
if [[ $EC == "204" ]]; then
TOKEN=`echo $AUTH|awk -F, '{print $2}'`
MGMTSVR=`echo $AUTH|awk -F, '{print $3}'`
- USERID=`echo $MGMTSVR | awk -F "/" '{print $5}'`
+ if [[ ! -n $USERID ]]; then
+ USERID=`echo $MGMTSVR | awk -F "/" '{print $5}'`
+ fi
else
if [[ $QUIET -eq 1 ]]; then
exit $EC
View
3  rsdns-a.sh
@@ -94,11 +94,12 @@ function delete_a () {
}
#Get options from the command line.
-while getopts "u:a:d:n:i:t::hkqxU" option
+while getopts "u:a:c:d:n:i:t::hkqxU" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
n ) NAME=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
i ) IP=$OPTARG ;;
View
3  rsdns-cn.sh
@@ -91,11 +91,12 @@ function delete_cn () {
}
#Get options from the command line.
-while getopts "u:a:n:d:r:t::hkqxU" option
+while getopts "u:a:c:n:d:r:t::hkqxU" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
n ) NAME=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
r ) CNAME=$OPTARG ;;
View
3  rsdns-did.sh
@@ -29,11 +29,12 @@ function usage () {
}
#Get options from the command line.
-while getopts "u:a:d:i::hkqx" option
+while getopts "u:a:c:d:i::hkqx" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
i ) ID=$OPTARG ;;
h ) usage;exit 0 ;;
View
3  rsdns-domain.sh
@@ -65,11 +65,12 @@ function delete_domain() {
}
#Get options from the command line.
-while getopts "u:a:d:e:t::hkqx" option
+while getopts "u:a:c:d:e:t::hkqx" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
e ) EMAIL=$OPTARG ;;
t ) TTL=$OPTARG ;;
View
3  rsdns-list.sh
@@ -73,11 +73,12 @@ function print_records() {
}
#Get options from the command line.
-while getopts "u:a:d::hkq" option
+while getopts "u:a:c:d::hkq" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
h ) usage;exit 0 ;;
q ) QUIET=1 ;;
View
3  rsdns-mx.sh
@@ -59,11 +59,12 @@ function delete_mx() {
}
#Get options from the command line.
-while getopts "u:a:d:n:D:p::hkqx" option
+while getopts "u:a:c:d:n:D:p::hkqx" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
n ) NAME=$OPTARG ;;
D ) DATA=$OPTARG ;;
View
4 rsdns-ns.sh
@@ -24,6 +24,7 @@ function usage () {
printf "\n"
printf "rscurl -u username -a apiKey -d domain -s old nameserver -S new nameserver \n"
printf "\t-k Use London/UK Servers.\n"
+ printf "\t-c clientID (cloud sites only)\n"
printf "\t-h Show this.\n"
printf "\n"
}
@@ -77,11 +78,12 @@ function update_ns() {
}
#Get options from the command line.
-while getopts "u:a:d:s:S:t::hkqx" option
+while getopts "u:a:c:d:s:S:t::hkqx" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
s ) OLDNS=$OPTARG ;;
S ) NEWNS=$OPTARG ;;
View
3  rsdns-srv.sh
@@ -55,11 +55,12 @@ function delete_srv() {
}
#Get options from the command line.
-while getopts "u:a:d:n:D:t::hkqx" option
+while getopts "u:a:c:d:n:D:t::hkqx" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
n ) NAME=$OPTARG ;;
D ) DATA=$OPTARG ;;
View
3  rsdns-txt.sh
@@ -55,11 +55,12 @@ function delete_txt() {
}
#Get options from the command line.
-while getopts "u:a:d:n:D:t::hkqx" option
+while getopts "u:a:c:d:n:D:t::hkqx" option
do
case $option in
u ) RSUSER=$OPTARG ;;
a ) RSAPIKEY=$OPTARG ;;
+ c ) USERID=$OPTARG ;;
d ) DOMAIN=$OPTARG ;;
n ) NAME=$OPTARG ;;
D ) DATA=$OPTARG ;;
Please sign in to comment.
Something went wrong with that request. Please try again.