From 28f82d059ded0bcc4350506050ffa1bfd4447e89 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Nov 2021 09:03:59 +0100 Subject: [PATCH] set datadir --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8dfdcea..1a223d6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,6 +50,12 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# If datadir doesn't exist, create it +if [ -z "$datadir" ]; then + datadir=/home/yunohost.app/$app + ynh_app_setting_set --app=$app --key=datadir --value=$datadir +fi + # Remove the option backup_core_only if it's in the settings.yml file ynh_app_setting_delete --app=$app --key=backup_core_only