Advertisement
Guest User

Untitled

a guest
Jul 16th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #!/bin/bash
  2. #syncdns.sh
  3.  
  4. declare -A masters
  5. masters[server1.webhold.hu]="87.229.23.76"
  6. masters[admin.webhold.hu]="88.151.101.123"
  7.  
  8. for K in "${!masters[@]}"
  9. do
  10. #echo $K ${masters[$K]}
  11. #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,
  12. #if you didn't specified any login credentials just remove or comment our the "--user=HTTPUSER --password=HTTPSPASS" options.
  13. /usr/bin/wget https://${masters[$K]}:4443/provisioning/slave_provisioning.php --no-check-certificate -O /etc/bind/named.conf.$K.download
  14. if test -s /etc/bind/named.conf.$K.download; then
  15. cp /etc/bind/named.conf.$K.download /etc/bind/named.conf.$K
  16. /usr/bin/logger "i-MSCP: DNS zones updated from $K\!"
  17. else
  18. /usr/bin/logger "i-MSCP: DNS zones could not be downloaded from $K\!"
  19. fi
  20. done
  21.  
  22. /etc/init.d/bind9 reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement