This script can be run on most modern Unix and Linux systems to use a cPanel & WHM server as a dynamic DNS provider.
This script is licensed under the Apache License, version 2.0. See the LICENSE file for more details.
License: Apache License 2.0
This script can be run on most modern Unix and Linux systems to use a cPanel & WHM server as a dynamic DNS provider.
This script is licensed under the Apache License, version 2.0. See the LICENSE file for more details.
This recently stopped working for me and that may have coincided with my hosting provider updating cpanel.
It looks like this might use the old cPanel Simple zone editor which is deprecated in recent version.
@ColMelvin @sfbee @bdraco @bk2204 ?
This is an incredibly useful tool I'll be lost without,
could you include in the readme and example of how to write a config file. i have multiple computers connected by different providers and each needs its own script. Inserting the specifics of the connection in each is not effective but I could not see how to write a config file.
Thank you for the nice and well working tool!
andrew
The XML serialization of the cPanel API is deprecated and will be removed in cPanel & WHM version 74. We should update this script so that it uses the JSON serialization instead.
We can use Perl (checking for /usr/local/cpanel/3rdparty/bin/perl
, /usr/bin/perl
, and /usr/local/bin/perl
) and JSON::PP to parse out the parts of the API response we want, since JSON::PP is part of core Perl since 5.13.9.
Hello:
I'm running the script like this:
bash ./cpanel-dynamic-dns.sh
I managed to connect using the script to the remote cpanel instance — at least is not giving me an access denied— and am getting this error:
Fetching zone for XXX.com....Not an ARRAY reference at -e line 3, <> chunk 1.
Not an ARRAY reference at -e line 3, <> chunk 1.
Request failed with error: Unknown Error (Please make sure you have the zoneedit, or simplezone edit permission on your account.)
Do you have any pointers on how to solve this issue? I'm connecting to the server using the normal cpanel http address in the configuration, my login and password.
Hi,
First, awesome script.
Second, this is not an issue, but just to confirm that the script works on FreeBSD 9.x, 10.x and 11.x, you only have to set the interpreter to #!/usr/local/bin/bash
instead of the linux bash symlink to sh (or use the bash ENV variable).
Keep up the great work!
Theres is something weird going on with the first line, if i leave as standard i get lots and lots of "unexpected operator" errors
./cpanel-dynamic-dns.sh: 351: [: 0: unexpected operator
./cpanel-dynamic-dns.sh: 354: [: 0: unexpected operator
./cpanel-dynamic-dns.sh: 351: [: 0: unexpected operator
./cpanel-dynamic-dns.sh: 354: [: 0: unexpected operator
./cpanel-dynamic-dns.sh: 360: [: unexpected operator
Request failed with error: ()
./cpanel-dynamic-dns.sh: 386: [: [email protected]: unexpected operator
skipping notification because a notication was sent 268 seconds ago.
if i remove the first # (hash charecter) i get the the following error (even in Quiet mode) but everything else works nicely
./cpanel-dynamic-dns.sh: line 1: !/bin/sh: No such file or directory
It is easier to revoke an API token than change a password, as changing the password may affect other things.
One could create an API token for each task, but not a password for each.
https://documentation.cpanel.net/display/80Docs/Manage+API+Tokens+In+cPanel
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.