From 7519447709e1ac9a5b5edaa04b32c03ac09ee2ef Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Jan 2011 12:02:11 -0600 Subject: archweb update: source virtualenv if it exists Signed-off-by: Dan McGee --- cron-jobs/update-web-db | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cron-jobs') diff --git a/cron-jobs/update-web-db b/cron-jobs/update-web-db index 8760fc6..6ced4c1 100755 --- a/cron-jobs/update-web-db +++ b/cron-jobs/update-web-db @@ -5,6 +5,8 @@ # setup paths SPATH="/srv/http/archweb" +ENVPATH="/srv/http/archweb-env/bin/activate" + # having "more important repos" last should make [core] trickle to the top of # the updates list each hour rather than being overwhelmed by big [extra] and # [community] updates @@ -24,6 +26,11 @@ renice +5 -p $$ > /dev/null echo "$cmd: Updating DB at $(date)" >> "${LOGOUT}" +# source our virtualenv if it exists +if [ -f "$ENVPATH" ]; then + . "$ENVPATH" +fi + case "$cmd" in update-web-db) dbfileext="${DBEXT}" -- cgit v1.2.3-24-g4f1b