Changeset 1299
- Timestamp:
- 06/02/04 19:42:11 (5 years ago)
- Files:
-
- trunk/debian/postrm (added)
- trunk/slavedns (modified) (3 diffs)
- trunk/slavedns.conf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/slavedns
r1298 r1299 10 10 function CreateBindConf { 11 11 CFILE="$1" 12 MASTER="$2"13 12 rm -f ${BINDDIR}/${CFILE} 14 13 cat ${CACHEDIR}/${CFILE} | (read A; while [ "$A" ]; # Treat each domain one by one. 15 14 do 16 echo "zone \"$A\" { type slave; allow-query { any; }; file \"$A\"; masters { $MASTER ; }; };" >>${BINDDIR}/${CFILE}15 echo "zone \"$A\" { type slave; allow-query { any; }; file \"$A\"; masters { $MASTERIP; }; };" >>${BINDDIR}/${CFILE} 17 16 read A 18 17 done) … … 31 30 for i in `ls * | grep -v slavedns.conf | grep -v '~$' ` 32 31 do 33 # HOST LOGIN PASSWORD 32 # HOST LOGIN PASSWORD MASTERIP 34 33 HOST="" 34 MASTERIP="" 35 35 LOGIN="" 36 36 PASSWORD="" 37 37 SSL="" 38 38 . $i 39 if [ -z "$HOST" -o -z "$LOGIN" -o -z "$PASSWORD" ]39 if [ -z "$HOST" -o -z "$LOGIN" -o -z "$PASSWORD" -o -z "$MASTERIP" ] 40 40 then 41 41 echo "Error in the config file '$i'" … … 61 61 cp -f ${CACHEDIR}/${i}.temp ${CACHEDIR}/${i} 62 62 # Now parse the slave file and send it to /etc/bind/slavedns 63 CreateBindConf ${i} ${HOST}63 CreateBindConf ${i} 64 64 RELOAD="YES" 65 65 fi trunk/slavedns.conf
r1298 r1299 5 5 # Each file contains shell variables and shell syntax must be correct. 6 6 7 # Hostname of the master dns server :7 # Hostname http[s] of the master dns server : 8 8 HOST=primary.example.com 9 10 # IP Address of the master dns server : 11 HOST=10.0.0.1 9 12 10 13 # Login of the slave to connect to the server (the primary dns administrator will give it to you.)
