diff options
-rwxr-xr-x | bin/ftpsync | 6 | ||||
-rw-r--r-- | etc/ftpsync.conf.sample | 16 |
2 files changed, 18 insertions, 4 deletions
diff --git a/bin/ftpsync b/bin/ftpsync index 20af095..633dc55 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -299,9 +299,13 @@ RSYNC_OPTIONS2=${RSYNC_OPTIONS2:-"--max-delete=40000 --delay-updates --delete -- # Which rsync share to use on our upstream mirror? RSYNC_PATH=${RSYNC_PATH:-"debian"} +# Extra rsync options as defined by the admin locally. Won't be set +# to any default by ftpsync. Those will be added to EACH AND EVERY rsync call. +RSYNC_EXTRA=${RSYNC_EXTRA:-""} + # Now add the bwlimit option. As default is 0 we always add it, rsync interprets # 0 as unlimited, so this is safe. -RSYNC_OPTIONS="--bwlimit=${RSYNC_BW} ${RSYNC_OPTIONS}" +RSYNC_OPTIONS="${RSYNC_EXTRA} --bwlimit=${RSYNC_BW} ${RSYNC_OPTIONS}" # We have no default host to sync from, but will error out if its unset RSYNC_HOST=${RSYNC_HOST:-""} diff --git a/etc/ftpsync.conf.sample b/etc/ftpsync.conf.sample index a311b77..6b16cc8 100644 --- a/etc/ftpsync.conf.sample +++ b/etc/ftpsync.conf.sample @@ -111,14 +111,24 @@ ## The rsync program #RSYNC=rsync +## Extra rsync options as defined by the local admin. +## There is no default by ftpsync. +## +## Please note that these options are added to EVERY rsync call. +## Also note that these are added at the beginning of the rsync call, as +## the very first set of options. +## Please ensure you do not add a conflict with the usual rsync options as +## shown below. +# RSYNC_EXTRA="" + +## limit I/O bandwidth. Value is KBytes per second, unset or 0 means unlimited +#RSYNC_BW="" + ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! -## limit I/O bandwidth. Value is KBytes per second, unset or 0 means unlimited -#RSYNC_BW="" - ## Default rsync options every rsync invocation sees. #RSYNC_OPTIONS="-prltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}" |