]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cronscript
Only hardcode path to config if variable isn't set
[dak.git] / config / debian / cronscript
index b9cdf25296d47fa7849884e4caaca7067e6a781a..2418d79a75249ad441c8e6e8e4ad303a391a574d 100755 (executable)
@@ -47,8 +47,12 @@ shopt -s extglob
 export LANG=C.UTF-8
 export LC_ALL=C.UTF-8
 
-# import the general variable set.
-export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
+# If run from crontab, CONFIGDIR will point to the correct dir
+# where we find the vars file
+configdir=${configdir:-"/srv/ftp-master.debian.org/dak/config/debian"}
+# import the general variable set. (This will overwrite configdir, but
+# it is expected to have the same value)
+export SCRIPTVARS=${configdir}/vars
 . $SCRIPTVARS
 
 # One arg please