diff --git a/scripts/upgrade b/scripts/upgrade index 621949c..f16f6b4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,6 +19,15 @@ upgrade_type=$(ynh_check_app_version_changed) # Retrieve YunoHost main domain for mails to work main_domain=$(cat /etc/yunohost/current_host) +#================================================= +# LOAD SETTINGS +#================================================= + +if [ -z "${jwt_key:-}" ]; then + jwt_key=$(ynh_string_random --length=45 | base64) + ynh_app_setting_set --app=$app --key=jwt_key --value=$jwt_key +fi + #================================================= # STANDARD UPGRADE STEPS #=================================================