DNS data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
758 B

  1. #!/bin/sh
  2. DIRS=
  3. for x in root/*/Makefile; do
  4. DIRS="$DIRS ${x%/*}"
  5. make -C ${x%/*}
  6. done
  7. RSYNCOPT="$RSYNCOPT --exclude */*.zone.in"
  8. RSYNCOPT="$RSYNCOPT --exclude .gitignore"
  9. RSYNCOPT="$RSYNCOPT --exclude Makefile"
  10. #RSYNCOPT="$RSYNCOPT --dry-run"
  11. RSYNCOPT="$RSYNCOPT --delete --delete-after --delete-excluded"
  12. (
  13. cat <<-EOT
  14. root@yoda.geeks.cl 2203 /etc/opt/djbdns/tinydns/root
  15. root@atlien.geeks.cl 22 /etc/opt/djbdns/tinydns/root
  16. root@koke.socomep.cl 2203 /etc/opt/djbdns/tinydns/root
  17. EOT
  18. ) | while read REMOTE PORT DIR; do
  19. (
  20. export RSYNC_RSH="ssh -p $PORT"
  21. echo "=== $REMOTE:$PORT ($DIR) ==="
  22. rsync -a root/Makefile "$REMOTE:$DIR" &&
  23. rsync -a $RSYNCOPT $DIRS "$REMOTE:$DIR" &&
  24. ssh -p $PORT $REMOTE make -B -C "$DIR" data.cdb
  25. ) < /dev/null
  26. done