From 523592dcad6bc3b0b69b808db0490cc5d47acb5d Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Wed, 10 Feb 2016 12:10:08 +0000 Subject: [PATCH] Added support for Moodle WebApp --- orchestra/contrib/webapps/backends/moodle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestra/contrib/webapps/backends/moodle.py b/orchestra/contrib/webapps/backends/moodle.py index 04161cfa..f140c6c5 100644 --- a/orchestra/contrib/webapps/backends/moodle.py +++ b/orchestra/contrib/webapps/backends/moodle.py @@ -34,7 +34,7 @@ class MoodleBackend(WebAppServiceMixin, ServiceController): touch %(app_path)s/.lock # Weekly caching moodle_date=$(date -r $(readlink %(cms_cache_dir)s/moodle) +%%s || echo 0) - if [[ $moodle_date -lt $(($(date +%%s)+7*24*60*60)) ]]; then + if [[ $moodle_date -lt $(($(date +%%s)-7*24*60*60)) ]]; then moodle_url=$(wget https://download.moodle.org/releases/latest/ -O - -q \\ | tr ' ' '\\n' \\ | grep 'moodle-latest.*.tgz"' \\