copy.sh 2.71 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
#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
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#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
51 52 53 54
# ki zone
echo "copying ki zone: "

cd $OUT/ki.squesh.net
hark's avatar
hark committed
55 56 57 58 59
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
60 61 62
cd $OUT

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

cd $OUT/ki.020
hark's avatar
hark committed
67
scp db.10.205.14 db.ki root@atc:/etc/bind/zones/
hark's avatar
hark committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
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


yids's avatar
yids committed
85 86 87 88 89 90 91 92 93
#
# Copy static zones 
#

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

hark's avatar
netzone  
hark committed
94 95 96 97 98
#020.
scp $STA/db.020 root@stanleyH:/etc/bind/zones/
scp $STA/db.020 root@atc:/etc/bind/zones/


yids's avatar
yids committed
99 100 101 102
# squest.net
scp $STA/squesh.net.db root@stanleyH:/etc/bind/zones/
scp $STA/squesh.net.db root@atc:/etc/bind/zones/

hark's avatar
netzone  
hark committed
103 104 105 106 107
# squest.net
scp $STA/net.020wireless.nl.db root@stanleyH:/etc/bind/zones/
scp $STA/net.020wireless.nl.db root@atc:/etc/bind/zones/


hark's avatar
hark committed
108 109 110 111 112 113 114 115 116
#
# 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