ansible/roles/dns/files/update-dns

23 lines
492 B
Text
Raw Normal View History

2014-12-06 22:46:11 +00:00
#!/bin/bash
dnsgit='https://infrastructure.fedoraproject.org/infra/dns.git'
2014-12-07 03:34:07 +00:00
destdir='/var/named/master/'
2014-12-06 22:46:11 +00:00
if [ ! -d $destdir ];
2014-12-07 00:30:58 +00:00
then
git clone $dnsgit $destdir
2014-12-06 22:46:11 +00:00
fi
cd $destdir
git fetch origin
2014-12-16 21:19:39 +00:00
if [ "`git diff origin/master`" != "" ];
then
git pull -X theirs
# change context so the chroot can cope
chown -R named.named $destdir
chcon -u system_u $destdir/* $destdir/*/*
# reload named
/sbin/service named start >>/dev/null 2>&1
/sbin/service named reload >>/dev/null 2>&1
fi