From 1b9688dbba140cb4722ac34273eba0dc99ad79ce Mon Sep 17 00:00:00 2001 From: Simon Paillard Date: Wed, 4 Nov 2009 01:13:35 +0100 Subject: Filter protect sponsor-specific files instead of exluding them (which delete them cause of --delete-excluded) --- bin/websync | 6 +++--- etc/websync.conf.sample | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/websync b/bin/websync index ba5ee5e..cc3ca8c 100755 --- a/bin/websync +++ b/bin/websync @@ -175,7 +175,7 @@ EXCLUDE=${EXCLUDE:-"--exclude ${HOSTNAME}"} EXCLUDE="${EXCLUDE} --exclude .~tmp~/" # And site specific excludes, by default its the sponsor stuff that should be local to all -SITE_EXCLUDE=${SITE_EXCLUDE:-"--exclude core --exclude sponsor_img.jpg --exclude sponsor.html"} +SITE_FILTER=${SITE_FILTER:-"--filter=protect_sponsor_img.jpg --filter=protect_sponsor.html"} # Hooks HOOK1=${HOOK1:-""} @@ -249,10 +249,10 @@ while [ -e "${UPDATEREQUIRED}" ]; do log "Running mirrorsync, update is required, ${UPDATEREQUIRED} exists" rm -f "${UPDATEREQUIRED}" - log "Syncing: ${RSYNC} ${RSYNC_OPTIONS} ${RSYNC_OPTIONS2} ${EXCLUDE} ${SITE_EXCLUDE} ${RSYNCPTH}::${RSYNC_PATH} ${TO}" + log "Syncing: ${RSYNC} ${RSYNC_OPTIONS} ${RSYNC_OPTIONS2} ${EXCLUDE} ${SITE_FILTER} ${RSYNCPTH}::${RSYNC_PATH} ${TO}" set +e - ${RSYNC} ${RSYNC_OPTIONS} ${RSYNC_OPTIONS2} ${EXCLUDE} ${SITE_EXCLUDE} \ + ${RSYNC} ${RSYNC_OPTIONS} ${RSYNC_OPTIONS2} ${EXCLUDE} ${SITE_FILTER} \ ${RSYNCPTH}::${RSYNC_PATH} "${TO}" >"${LOGDIR}/rsync-${NAME}.log" 2>"${LOGDIR}/rsync-${NAME}.error" result=$? set -e diff --git a/etc/websync.conf.sample b/etc/websync.conf.sample index 08e2413..b397fef 100644 --- a/etc/websync.conf.sample +++ b/etc/websync.conf.sample @@ -53,11 +53,11 @@ ## If you do want to exclude files from the mirror run, put --exclude statements here. ## See rsync(1) for the exact syntax, these are passed to rsync as written here. ## Please do not use this except for rare cases and after you talked to us. -## For the sponsor logos see SITE_EXCLUDE +## For the sponsor logos see SITE_FILTER #EXCLUDE=${EXCLUDE:-"--exclude ${HOSTNAME}"} ## And site specific excludes, by default its the sponsor stuff that should be local to all -#SITE_EXCLUDE=${SITE_EXCLUDE:-"--exclude core --exclude sponsor_img.jpg --exclude sponsor.html"} +#SITE_FILTER=${SITE_FILTER:-"--filter=protect_sponsor_img.jpg --filter=protect_sponsor.html"} ## Do we have leaf mirror to signal we are done and they should sync? ## If so set it to true and make sure you configure runmirrors-websync.mirrors -- cgit v1.2.3