summaryrefslogtreecommitdiff
path: root/bin/ftpsync
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ftpsync')
-rwxr-xr-xbin/ftpsync20
1 files changed, 15 insertions, 5 deletions
diff --git a/bin/ftpsync b/bin/ftpsync
index 1d87b22..68c640d 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -53,31 +53,41 @@ fi
# There should be nothing to edit here, use the config file #
########################################################################
HOSTNAME=${HOSTNAME:-`hostname -f`}
+# Where to put logfiles in
LOGDIR=${LOGDIR:-"${HOME}/log"}
+# Our own logfile
LOG=${LOG:-"${LOGDIR}/${NAME}.log"}
-TO="/org/ftp.debian.org/ftp/"
+
+# Where should we put all the mirrored files?
+TO=${TO:-"/org/ftp.debian.org/ftp/"}
# used by log()
-PROGRAM=${PROGRAM:-"ftpsync-$(hostname -s)"}
+PROGRAM=${PROGRAM:-"${NAME}-$(hostname -s)"}
# Where to send mails about mirroring to?
MAILTO=${MAILTO:-"joerg@debian.org"}
+# How to rotate our log
SAVELOG=${SAVELOG:-"savelog -t -c 14"}
+# Lockfile program
LOCKFILE=${LOCKFILE:-"lockfile"}
+# Our lockfile
LOCK=${LOCK:-"${TO}/Archive-Update-in-Progress-${HOSTNAME}"}
+# Do we need another rsync run?
UPDATEREQUIRED="${TO}/Archive-Update-Required-${HOSTNAME}"
+# Trace file for mirror stats and checks
TRACE=${TRACE:-"project/trace/${HOSTNAME}"}
+# rsync program
RSYNC=${RSYNC:-rsync}
# Default rsync options for *every* rsync call
RSYNC_OPTIONS=${RSYNC_OPTIONS:-"-rltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${HOSTNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${HOSTNAME}"}
-# Options we only use in the first pass, where we do not want packages/sources to fly in yet
+# Options we only use in the first pass, where we do not want packages/sources to fly in yet and dont want to delete files
RSYNC_OPTIONS1=${RSYNC_OPTIONS1:-"--exclude Packages* --exclude Sources* --exclude Release* --exclude ls-lR*"}
-# Options for the second pass, where we do want everything
+# Options for the second pass, where we do want everything, including deletion of old and now unused files
RSYNC_OPTIONS2=${RSYNC_OPTIONS2:-"--max-delete=40000 --delay-updates --delete --delete-after"}
-# Which rsync share to use?
+# Which rsync share to use on our upstream mirror?
RSYNC_PATH=${RSYNC_PATH:-"ftp"}
# General excludes. Dont list architecture specific stuff here, use ARCH_EXCLUDE for that!