tokiwinter / cloudns-api Goto Github PK
View Code? Open in Web Editor NEWScript for interacting with the ClouDNS API.
License: GNU General Public License v3.0
Script for interacting with the ClouDNS API.
License: GNU General Public License v3.0
An integer check for the id is coded with a maz value of 100000000 (line: 1115).
Looks like the ids in clouDNS exceed this value.
Fx is to add another 0 - until this ID range is exeeded.
Change function foo
to function foo()
.
If anybody wants to help maintain this, please let me know.
Unfortunately, I am very busy (as evidenced by it taking me six months to review two PRs).
Thanks!
Hello from germany,
is is a really nice script wich helps me so much. But i have one problem:
I need the "host=" flag empty but i could not find a solution for that. My workaround at the moment is host=@ and then i have to manual delete the @ in customer dashboard.
Hi,
I'm having trouble with API.
cloudns_api.sh -sj listrecords $ZONE host=@ type=A showid=true | jq --raw-output '.id'
This works, but also adds '@' for the host.
does not return a record??
Any help which can be provided?
Thanks!
Hello there,
We mainly use sub auth users for authentication in order to allow least privileges to our users.
According to the documentation, this can be used to login to the api using sub-auth-id
or sub-auth-user
.
You script only sets auth-id
here. I have tried to change it to use sub-auth-user
and it works just fine.
I will open a PR to add the possibility to use the others.
Hello ! First of all thanks for te script, I successfully created a master zone this way
cloudns_api.sh addzone 'api.net&master'
Then I attempt to create A record this way
cloudns_api.sh addrecord api.net type=A host=www record=201.139.116.6 ttl=3600
And i got this
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: type is not a valid key
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: host is not a valid key
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: record is not a valid key
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: ttl is not a valid key
Could you help me to know what is wrong ? I am running the script in Centos 7. Thanks in advanced !
Is there a reason the script specifies absolute paths for every utility it uses?
AWK="/usr/bin/awk"
BASENAME="/usr/bin/basename"
CAT="/usr/bin/cat"
CURL="/usr/bin/curl"
CUT="/usr/bin/cut"
DATE="/usr/bin/date"
ECHO="builtin echo"
EVAL="builtin eval"
GETOPTS="builtin getopts"
GREP="/usr/bin/grep"
JQ="/usr/bin/jq"
SED="/usr/bin/sed"
SLEEP="/usr/bin/sleep"
TEST="/usr/bin/test"
TR="/usr/bin/tr"
WC="/usr/bin/wc"
This is not very portable. For example, if I compile jq myself, it will normally be in /usr/local/bin
rather than /usr/bin
, and Debian usually has date
in /bin/date
rather than /usr/bin/date
.
These are the changes I had to make to get it running on Debian and Ubuntu:
--- a/bin/cloudns_api.sh
+++ b/bin/cloudns_api.sh
@@ -5,13 +5,13 @@ BASENAME="/usr/bin/basename"
CAT="/usr/bin/cat"
CURL="/usr/bin/curl"
CUT="/usr/bin/cut"
-DATE="/usr/bin/date"
+DATE="/bin/date"
ECHO="builtin echo"
EVAL="builtin eval"
GETOPTS="builtin getopts"
-GREP="/usr/bin/grep"
+GREP="/bin/grep"
JQ="/usr/bin/jq"
-SED="/usr/bin/sed"
+SED="/bin/sed"
-SLEEP="/usr/bin/sleep"
+SLEEP="/bin/sleep"
TEST="/usr/bin/test"
TR="/usr/bin/tr"
It would be easier to just rely on these being on the path rather than explicitly specifying the absolute path to them.
Hello.
Why it's showing this error when I try to get the id records?
./cloudns_api.sh: line 275: local: -n: invalid option
local: usage: local [option] name[=value] ...
Error: showid is not a valid key
Tks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.