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
755 B

#!/bin/sh
DIRS=
for x in root/*/Makefile; do
DIRS="$DIRS ${x%/*}"
make -C ${x%/*}
done
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@yoda.geeks.cl 2203 /etc/opt/djbdns/tinydns/root
root@atlien.geeks.cl 22 /etc/opt/djbdns/tinydns/root
root@koke.socomep.cl 2203 /etc/opt/djbdns/tinydns/root
EOT
) | while read REMOTE PORT DIR; do
(
export RSYNC_RSH="ssh -p $PORT"
echo "=== $REMOTE:$PORT ($DIR) ==="
rsync -a root/Makefile "$REMOTE:$DIR" &&
rsync -a $RSYNCOPT $DIRS "$REMOTE:$DIR" &&
ssh -p $PORT $REMOTE make -C "$DIR" data.cdb
) < /dev/null
done