1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snserver_ynh.git synced 2024-09-03 20:26:22 +02:00

Update: Add cron and config_panel

This commit is contained in:
Fabian Wilkens 2022-08-08 02:18:22 +02:00
parent 48738a664f
commit 95e328d606
No known key found for this signature in database
GPG key ID: 23DFA025BB4E9FAB
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -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.