copy.sh 1.76 KB
Newer Older
hark's avatar
hark committed
1 2 3 4
#!/bin/bash -x

. paths.sh

hark's avatar
hark committed
5
HOSTS="stanleyH atc kalium"
hark's avatar
hark committed
6 7 8 9

#
# copy all 020 reverse zones
# 
hark's avatar
hark committed
10 11 12 13
#make_zone hostfile.amsw amsw.020 10.205.252:255.255.255.0
#make_zone hostfile.routers routers.020 10.205.253:255.255.255.0
#make_zone hostfile.transfernet transfernet.020 10.205.254:255.255.255.0
#make_zone hostfile.radio radio.020 10.205.255:255.255.255.0
hark's avatar
hark committed
14

hark's avatar
hark committed
15 16
for H in $HOSTS
do
hark's avatar
hark committed
17

hark's avatar
hark committed
18 19
  #gitzones
  scp $HFD/gitzones.conf root@$H:/etc/bind/zones/
hark's avatar
hark committed
20

hark's avatar
hark committed
21 22
  #forward
  scp $HFD/forwardzones.conf root@$H:/etc/bind/zones/
hark's avatar
hark committed
23

hark's avatar
hark committed
24 25
  #adm
  scp $HFD/adm.conf root@$H:/etc/bind/zones/
hark's avatar
hark committed
26

hark's avatar
hark committed
27 28 29
  #tinc tunnel
  cd $OUT/amsw.020
  scp db.10.205.252 db.amsw  root@$H:/etc/bind/zones/
hark's avatar
hark committed
30

hark's avatar
hark committed
31
  cd $OUT
hark's avatar
hark committed
32

hark's avatar
hark committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
  #routers
  cd $OUT/routers.020
  scp db.10.205.253 db.routers  root@$H:/etc/bind/zones/
  cd $OUT
  #transfernet
  cd $OUT/transfernet.020
  scp db.10.205.255 db.transfernet  root@$H:/etc/bind/zones/
  cd $OUT
  #radio
  #cd $OUT/radio.020
  #scp db.10.205.255 db.radio  root@atc:/etc/bind/zones/
  #scp db.10.205.255 db.radio  root@stanleyH:/etc/bind/zones/
  #cd $OUT
  # ki zone
  echo "copying ki zone: "

  cd $OUT/ki.020
  scp db.10.205.14 db.ki root@$H:/etc/bind/zones/
  cd $OUT


  #
  # irl zone
  #
  echo "copying irl zone: "

  cd $OUT/irl.020
  scp db.10.205.12 db.irl root@$H:/etc/bind/zones/
  cd $OUT
hark's avatar
hark committed
62

yids's avatar
yids committed
63

hark's avatar
hark committed
64 65 66
  #
  # Copy static zones 
  #
yids's avatar
yids committed
67

hark's avatar
hark committed
68 69
  # Static zones
  scp $HFD/staticzones.conf root@$H:/etc/bind/zones/
hark's avatar
netzone  
hark committed
70

hark's avatar
hark committed
71 72
  #020.
  scp $STA/db.020 root@$H:/etc/bind/zones/
hark's avatar
netzone  
hark committed
73

hark's avatar
hark committed
74 75
  # squesh.net
  scp $STA/squesh.net.db root@$H:/etc/bind/zones/
yids's avatar
yids committed
76

hark's avatar
hark committed
77 78
  # squest.net
  scp $STA/net.020wireless.nl.db root@$H:/etc/bind/zones/
hark's avatar
netzone  
hark committed
79

hark's avatar
hark committed
80
done
hark's avatar
netzone  
hark committed
81

hark's avatar
hark committed
82 83 84 85 86 87 88 89 90
#
# reload configs
#
echo "reload trashbat: "
ssh root@trashbat /etc/init.d/bind9 reload
echo "reload stanleyH: "
ssh root@stanleyH /etc/init.d/named reload
echo "reload air traffic control: "
ssh root@atc /etc/init.d/bind9 reload