config file
andrewufrank opened this issue · 2 comments
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
Why don't you try ansible https://www.ansible.com/ to upload and deploy the script :-) good luck !!!
one way you could do it (how i did it)
Replace the config entrees with arg numbers and add the different data as calls on the command line
EG
DOMAIN=$2
SUBDOMAIN=$1
My cron
05 * * * * /home/loz/.cpanel-dynamic-dns.sh home blah.com
the same can be done for all the config variable and just keep going up the numbers and adding them as args to the command
EG
05 * * * * /home/loz/.cpanel-dynamic-dns.sh home blah.com blah.com MyUser MyPass
DOMAIN=$2
SUBDOMAIN=$1
CPANEL_SERVER=$3
CPANEL_USER=$4
CPANEL_PASS=$5