summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2009-12-30 20:04:21 +0100
committerJoerg Jaspert <joerg@debian.org>2009-12-30 20:08:16 +0100
commit6150ca3f200c75d902a5f61af7c99923e8a8d3aa (patch)
tree4b4b14971080c2293f36547ff48c1329806ccce3
parentf1e4d734e5e5b2fe4a64a1e60739ae0cca2e5e21 (diff)
ftpsync
add check if RSYNC_HOST is set Signed-off-by: Joerg Jaspert <joerg@debian.org>
-rwxr-xr-xbin/ftpsync7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ftpsync b/bin/ftpsync
index c510f36..db2ca1e 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -266,6 +266,13 @@ RSYNC_OPTIONS2=${RSYNC_OPTIONS2:-"--max-delete=40000 --delay-updates --delete --
# Which rsync share to use on our upstream mirror?
RSYNC_PATH=${RSYNC_PATH:-"ftp"}
+# We have no default host to sync from, but will error out if its unset
+RSYNC_HOST=${RSYNC_HOST:-""}
+# Error out if we have no host to sync from
+if [ -z "${RSYNC_HOST}" ]; then
+ error "Missing a host to mirror from, please set RSYNC_HOST variable in ${BASEDIR}/etc/${NAME}.conf"
+fi
+
# our username for the rsync share
RSYNC_USER=${RSYNC_USER:-""}
# the password