User Tools

Site Tools


update_bind_configurations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

update_bind_configurations [2011/05/10 14:51]
jt
update_bind_configurations [2020/08/10 02:35]
Line 1: Line 1:
-==== Update Bind Configurations ==== 
  
-<code bash> 
-#​!/​bin/​bash ​ 
- 
-# Check SVN repository for ACL update then, fetch and reload named 
- 
-BINDPATH="/​etc/​bind"​ 
-MAILTO="​jthomas@lithiumfox.com"​ 
-REPO="​http://​jason.lithiumfox.com/​svn/​repos/​dns"​ 
- 
- 
-if $(svn st -u $BINDPATH|egrep '​(acls.conf?​|as[1-9]+.acl?​)'​ > /dev/null 2>&​1) 
- then 
- REVISION=$(svn update $BINDPATH | grep revision | awk '​{print $NF}'| tr -d \.)  
- if ERROR=$(/​usr/​sbin/​named-checkconf $BINDPATH/​named.conf) 
- then 
- /​etc/​init.d/​named reload > /dev/null 2>&1 
- else 
- let "​REVISION -= 1" ​ 
- echo $ERROR | mail -s "​$HOSTNAME - DNS ACL update failed!"​ $MAILTO 
- svn co -r $REVISION $REPO $BINDPATH > /dev/null 2>&1 
- fi 
-fi 
-</​code>​ 
update_bind_configurations.txt ยท Last modified: 2020/08/10 02:35 (external edit)