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.

24 lines
656 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="-avP"
  8. RSYNCOPT="$RSYNCOPT --exclude */*.zone.in"
  9. RSYNCOPT="$RSYNCOPT --exclude .gitignore"
  10. RSYNCOPT="$RSYNCOPT --exclude Makefile"
  11. #RSYNCOPT="$RSYNCOPT --dry-run"
  12. RSYNCOPT="$RSYNCOPT --delete --delete-after --delete-excluded"
  13. (
  14. cat <<-EOT
  15. root@atlien.geeks.cl 22 /etc/opt/djbdns/tinydns/root
  16. root@socomep.geeks.cl 2203 /etc/opt/djbdns/tinydns/root
  17. EOT
  18. ) | while read REMOTE PORT DIR; do
  19. echo "=== $REMOTE:$PORT ($DIR) ==="
  20. ( rsync --rsh "ssh -p $PORT" $RSYNCOPT $DIRS "$REMOTE:$DIR" && ssh -p $PORT $REMOTE make -C "$DIR" data.cdb ) < /dev/null
  21. done