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.

31 lines
860 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. root@188.40.92.201 2201 /etc/opt/djbdns/tinydns/root
  18. root@85.25.151.48 2201 /etc/opt/djbdns/tinydns/root
  19. EOT
  20. ) | while read REMOTE PORT DIR; do
  21. (
  22. export RSYNC_RSH="ssh -p $PORT"
  23. echo "=== $REMOTE:$PORT ($DIR) ==="
  24. rsync -a root/Makefile "$REMOTE:$DIR/"
  25. rsync -a $RSYNCOPT $DIRS "$REMOTE:$DIR/"
  26. ssh -p $PORT $REMOTE make -B -C "$DIR/" data.cdb
  27. ) < /dev/null
  28. done