Bash script which make a curl request to a server that will change a HAproxy backend server ip.
Usage :
- Download
marsdns-client.sh
to/usr/local/share/
on the system that has a dynamic IP :cd /usr/local/share/ ; git clone https://github.com/gqdc/marsdns-client/marsdns-client.sh
- Edit
marsdns-client.sh
, to set mandatory settings. - Execute marsdns.sh manually and check the log file :
bash /usr/local/share/marsdns-client.sh ; tail /var/log/marsdns.log
- If results are correct, add a new task in your crontab to execute marsdns.sh, for example, every 5 minutes :
*/5 * * * * bash /usr/local/share/marsdns.sh