Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #syncdns.sh
- declare -A masters
- masters[server1.webhold.hu]="87.229.23.76"
- masters[admin.webhold.hu]="88.151.101.123"
- for K in "${!masters[@]}"
- do
- #echo $K ${masters[$K]}
- #in the next line change HTTPUSER and HTTPPASS for the same credentials you used in the listener on you i-MSCP server in $authUsername and $authPassword variables,
- #if you didn't specified any login credentials just remove or comment our the "--user=HTTPUSER --password=HTTPSPASS" options.
- /usr/bin/wget https://${masters[$K]}:4443/provisioning/slave_provisioning.php --no-check-certificate -O /etc/bind/named.conf.$K.download
- if test -s /etc/bind/named.conf.$K.download; then
- cp /etc/bind/named.conf.$K.download /etc/bind/named.conf.$K
- /usr/bin/logger "i-MSCP: DNS zones updated from $K\!"
- else
- /usr/bin/logger "i-MSCP: DNS zones could not be downloaded from $K\!"
- fi
- done
- /etc/init.d/bind9 reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement