]> git.openstreetmap.org Git - dns.git/blob - bin/update
openstreetmap.gay has been transferred to Gandi
[dns.git] / bin / update
1 #!/bin/bash
2 #
3 # Upload data to Bytemark Hosting's content DNS servers
4 #
5
6 RSYNC=/usr/bin/rsync
7 USER=openstreetmap
8
9 if [ ! -f $RSYNC ] ; then
10   echo "You need rsync installed to use this script"
11   if [ -f /etc/debian_version ] ; then
12     echo "I'll try to install it automatically."
13     apt-get install rsync
14   fi
15 fi
16
17 for SERVER in  upload ; do
18   echo -n "Server $SERVER.ns.bytemark.co.uk..."
19   if ping -c 1 $SERVER.ns.bytemark.co.uk >/dev/null 2>&1 ; then
20     echo -n "alive, sending updates..."
21     if $RSYNC -C -r --delete  data/ dns@$SERVER.ns.bytemark.co.uk::$USER; then
22       echo "sent."
23     else
24       echo "failed :-("
25     fi
26   else
27     echo "not responding."
28   fi
29 done