summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2008-10-22 00:47:07 +0200
committerJoerg Jaspert <joerg@debian.org>2008-10-22 00:47:07 +0200
commit6a4c52360af31ca0ef2ae10c9692e1d3ad402a3c (patch)
tree2bae0618702914601686a26cfe6b317f35336c36
parent2ba6ed6fad84b8b14a58df8d149f3ba9a6960b27 (diff)
ftpsync
now, check if we know the configfile. Signed-off-by: Joerg Jaspert <joerg@debian.org>
-rwxr-xr-xbin/ftpsync7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/ftpsync b/bin/ftpsync
index 968394c..90f5b9b 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -168,7 +168,12 @@ fi
# Now source the config for the archive we run on.
# (Yes, people can also overwrite the options above in the config file
# if they want to)
-. "${BASEDIR}/etc/${NAME}.conf"
+if [-f "${BASEDIR}/etc/${NAME}.conf" ]; then
+ . "${BASEDIR}/etc/${NAME}.conf"
+else
+ echo "Nono, you can't tell us about random archives. Bad boy!"
+ exit 1
+fi
########################################################################
# Config options go here. Feel free to overwrite them in the config #