#!/bin/csh -f # ------------------------------------------- # Author : Eric Poiseau # History : Updated for Istanbul CAT # This script is used to synchronize the Central Archive with the Gazelle database (to get the configurations of the systems SCU and SCP) : # # ------------------------------------------- # ------------------------------------------- # Please check and modify the following variables: # Local path to postgresql installation #setenv WD "/opt/gazelle/dns" setenv WD "/etc/bind" setenv GAZELLE_SERVER "127.0.0.1" setenv SESSION_ID 29 setenv DNS_FILE "http://$GAZELLE_SERVER/gazelle/configuration/dns.seam?sessionId=$SESSION_ID" setenv REVERSE_DNS_FILE "http://$GAZELLE_SERVER/gazelle/configuration/reverse.seam?sessionId=$SESSION_ID" # DO NOT MODIFY ANY LINE BELOW THIS ONE # # ------------------------------------------- # Shell - do not modify below # Variables declaration if ($#argv != 0) then echo "This shell needs none argument - launch : ./update_dns.csh " exit endif # ### # Download the dns file from Gazelle echo ""; echo "Download the dns file from Gazelle : $DNS_FILE" /usr/bin/wget -np -O $WD/db.192.168 --content-disposition "$DNS_FILE" echo "Download the reverse dns file from Gazelle : $DNS_FILE" /usr/bin/wget -np -O $WD/reverse.192.168 --content-disposition "$REVERSE_DNS_FILE" echo "Restart DNS server..." sudo /etc/init.d/bind9 restart echo "" echo "DNS updated !" echo ""