Browse Source

Introduced update.sh script to push the new zones into the name servers

testing
Alejandro 16 years ago
parent
commit
c96ff492d4
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      update.sh

+ 24
- 0
update.sh

@ -0,0 +1,24 @@
#!/bin/sh
DIRS=
for x in root/*/Makefile; do
DIRS="$DIRS ${x%/*}"
make -C ${x%/*}
done
RSYNCOPT="-avP"
RSYNCOPT="$RSYNCOPT --exclude */*.zone.in"
RSYNCOPT="$RSYNCOPT --exclude .gitignore"
RSYNCOPT="$RSYNCOPT --exclude Makefile"
#RSYNCOPT="$RSYNCOPT --dry-run"
RSYNCOPT="$RSYNCOPT --delete --delete-after --delete-excluded"
(
cat <<-EOT
root@atlien.geeks.cl 22 /etc/opt/djbdns/tinydns/root
root@socomep.geeks.cl 2203 /etc/opt/djbdns/tinydns/root
EOT
) | while read REMOTE PORT DIR; do
echo "=== $REMOTE:$PORT ($DIR) ==="
( rsync --rsh "ssh -p $PORT" $RSYNCOPT $DIRS "$REMOTE:$DIR" && ssh -p $PORT $REMOTE make -C "$DIR" data.cdb ) < /dev/null
done

Loading…
Cancel
Save