copy.sh 2.17 KB
Newer Older
hark's avatar
hark committed
1 2 3 4 5 6 7 8
#!/bin/bash -x

. paths.sh


#
# copy all 020 reverse zones
# 
hark's avatar
hark committed
9 10 11 12
#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
13

hark's avatar
hark committed
14 15 16 17 18 19

#gitzones
scp $HFD/gitzones.conf root@trashbat:/etc/bind/zones/
scp $HFD/gitzones.conf root@stanleyH:/etc/bind/zones/
scp $HFD/gitzones.conf root@atc:/etc/bind/zones/

hark's avatar
hark committed
20 21 22 23 24 25 26 27 28 29 30 31
#forward
scp $HFD/forwardzones.conf root@trashbat:/etc/bind/zones/
scp $HFD/forwardzones.conf root@stanleyH:/etc/bind/zones/
scp $HFD/forwardzones.conf root@atc:/etc/bind/zones/

#adm
scp $HFD/adm.conf root@trashbat:/etc/bind/zones/
scp $HFD/adm.conf root@stanleyH:/etc/bind/zones/
scp $HFD/adm.conf root@atc:/etc/bind/zones/



hark's avatar
hark committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
#tinc tunnel
cd $OUT/amsw.020
scp db.10.205.252 db.amsw  root@atc:/etc/bind/zones/
scp db.10.205.252 db.amsw  root@stanleyH:/etc/bind/zones/
cd $OUT

#routers
cd $OUT/routers.020
scp db.10.205.253 db.routers  root@atc:/etc/bind/zones/
scp db.10.205.253 db.routers  root@stanleyH:/etc/bind/zones/
cd $OUT
#transfernet
cd $OUT/transfernet.020
scp db.10.205.255 db.transfernet  root@atc:/etc/bind/zones/
scp db.10.205.255 db.transfernet  root@stanleyH:/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
hark's avatar
hark committed
53 54 55 56
# ki zone
echo "copying ki zone: "

cd $OUT/ki.squesh.net
hark's avatar
hark committed
57 58 59 60 61
scp db.10.205.14 db.ki root@trashbat:/etc/bind/zones/
cd $OUT

cd $OUT/ki.020
scp db.10.205.14 db.ki root@trashbat:/etc/bind/zones/
hark's avatar
hark committed
62 63 64
cd $OUT

cd $OUT/ki.020
hark's avatar
hark committed
65
scp db.10.205.14 db.ki root@stanleyH:/etc/bind/zones/
hark's avatar
hark committed
66 67 68
cd $OUT

cd $OUT/ki.020
hark's avatar
hark committed
69
scp db.10.205.14 db.ki root@atc:/etc/bind/zones/
hark's avatar
hark committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
cd $OUT


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

cd $OUT/irl.020
scp db.10.205.12 db.irl root@stanleyH:/etc/bind/zones/
cd $OUT

cd $OUT/irl.020
scp db.10.205.12 db.irl root@atc:/etc/bind/zones/
cd $OUT


#
# 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