summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-08 12:02:11 -0600
committerDan McGee <dan@archlinux.org>2011-01-08 12:02:11 -0600
commit7519447709e1ac9a5b5edaa04b32c03ac09ee2ef (patch)
tree18a2ef38050efc835007ed619bf675d7b7475fc7 /cron-jobs
parent1f81b42ce2cf0c7517609bd6d5fa941a4bc01233 (diff)
archweb update: source virtualenv if it exists
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/update-web-db7
1 files changed, 7 insertions, 0 deletions
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}"