From 2750b4944ddee05754ec61987e915fbbd798c603 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 22 Feb 2017 15:24:06 -0800 Subject: [PATCH] Use scheduler addon to update feeds Fixes #6 --- CloudronManifest.json | 8 +++++++- start.sh | 6 ------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CloudronManifest.json b/CloudronManifest.json index c634f59..d9342fe 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -10,7 +10,13 @@ "httpPort": 8000, "addons": { "localstorage": {}, - "mysql": {} + "mysql": {}, + "scheduler": { + "update_feeds": { + "schedule": "*/1 * * * *", + "command": "/usr/local/bin/gosu www-data:www-data php /app/code/app/actualize_script.php" + } + } }, "manifestVersion": 1, "website": "http://www.freshrss.org", diff --git a/start.sh b/start.sh index 2ecea96..7b0d6db 100755 --- a/start.sh +++ b/start.sh @@ -60,12 +60,6 @@ EOF chown -R www-data.www-data /run/php /app/data -echo "Trying to update feeds every 60 secs" -while true; do - sleep 60 - sudo -u www-data php /app/code/app/actualize_script.php >/dev/stdout 2>/dev/stderr -done & - echo "Starting apache" APACHE_CONFDIR="" source /etc/apache2/envvars rm -f "${APACHE_PID_FILE}"