From 95e328d60624eeb2ab39e9cdc69a9ceace78fbd3 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Mon, 8 Aug 2022 02:18:22 +0200 Subject: [PATCH] Update: Add cron and config_panel --- conf/cron.env | 7 +++++++ sources/extra_files/cron.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf/cron.env b/conf/cron.env index fb49032..eb03e00 100644 --- a/conf/cron.env +++ b/conf/cron.env @@ -1,3 +1,10 @@ +# cron.env +# This file get overwritten when the app gets upgraded. +# Change the value in the config_panel +# https://my_domain.tld/yunohost/admin/#/apps/$app_id/config-panel + +# Default FILES Upload Linit in MB for new users. +# 100 = 100MB, 1000 = 1000MB, 1024 = 1GB, 10240 = 10GB FILES_SIZE=100 DB_HOST=localhost diff --git a/sources/extra_files/cron.sh b/sources/extra_files/cron.sh index 17ca024..2e5f2be 100755 --- a/sources/extra_files/cron.sh +++ b/sources/extra_files/cron.sh @@ -10,7 +10,7 @@ FILE_UPLOAD_BYTES_LIMIT=$(($FILES_SIZE*$FILE_UPLOAD_BYTES_PER_MB)) # Searching for new users in the last 10 minutes without a Pro_Plan subscription. mysql --password=$DB_PASSWORD --database=$DB_DATABASE <<< " \ - SELECT email FROM users WHERE created_at >= DATE_SUB( TIMESTAMP(NOW()), INTERVAL 10 HOUR) AND NOT EXISTS( SELECT * FROM user_subscriptions WHERE user_subscriptions.plan_name = \"PRO_PLAN\" AND user_subscriptions.user_uuid = users.uuid ); \ + SELECT email FROM users WHERE created_at >= DATE_SUB( TIMESTAMP(NOW()), INTERVAL 10 MINUTE) AND NOT EXISTS( SELECT * FROM user_subscriptions WHERE user_subscriptions.plan_name = \"PRO_PLAN\" AND user_subscriptions.user_uuid = users.uuid ); \ " 2>/dev/null | # Read through the piped result until it's empty.