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.

25 lines
582 B

  1. #!/bin/sh
  2. RSYNCOPT="-azOP"
  3. #RSYNCOPT="$RSYNCOPT --exclude */*.zone.in"
  4. #RSYNCOPT="$RSYNCOPT --exclude .gitignore"
  5. RSYNCOPT="$RSYNCOPT --exclude data.cdb"
  6. #RSYNCOPT="$RSYNCOPT --dry-run"
  7. RSYNCOPT="$RSYNCOPT --delete --delete-after"
  8. if [ "$(echo -e .)" = "." ]; then
  9. ECHO="echo -e"
  10. else
  11. ECHO="echo"
  12. fi
  13. while read REMOTE PORT DIR; do
  14. (
  15. export RSYNC_RSH="ssh -p $PORT"
  16. $ECHO "\n=== $REMOTE:$PORT ($DIR) ==="
  17. rsync $RSYNCOPT data/stage/ "$REMOTE:$DIR/" &&
  18. ssh -p $PORT $REMOTE make -B -C "$DIR/" data.cdb
  19. $ECHO "-----> errno: $?"
  20. ) < /dev/null
  21. done < root/farm.txt
  22. true