File: dnsslave-2.sh

package info (click to toggle)
maradns 1.2.12.04-1etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 6,676 kB
  • ctags: 2,176
  • sloc: ansic: 26,137; sh: 3,657; perl: 703; makefile: 622; python: 593; sql: 106; awk: 11
file content (20 lines) | stat: -rwxr-xr-x 429 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# For security reasons, put this file in a directory that only root
# may write to. 
TEMP=/root/tmp/foo

cd /etc/maradns
fetchzone example.com 127.0.0.1 > $TEMP
if [ $? -eq 0 ] ; then
        mv $TEMP db.example.com
fi
fetchzone example.org 127.0.0.1 > $TEMP
if [ $? -eq 0 ] ; then
        mv $TEMP db.example.org
fi
fetchzone example.net 127.0.0.1 > $TEMP
if [ $? -eq 0 ] ; then
        mv $TEMP db.example.net
fi