From fe507604aef8df8b4f4a080008931a2f8872db39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 1 Jul 2024 13:52:02 +0200 Subject: [PATCH] Fix upgrade missing vars --- scripts/upgrade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a31e58f..6b4b862 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,27 +13,27 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # Migrate manifest questions -if [ -z "$admin_username" ]; then +if [ -z "${admin_username:-}" ]; then admin_username="$username" ynh_app_setting_set --app="$app" --key="admin_username" --value="$admin_username" fi -if [ -n "$username" ]; then +if [ -n "${username:-}" ]; then ynh_app_setting_delete --app="$app" --key="username" fi -if [ -z "$admin_name" ]; then +if [ -z "${admin_name:-}" ]; then admin_name="$name" ynh_app_setting_set --app="$app" --key="admin_name" --value="$admin_name" fi -if [ -n "$name" ]; then +if [ -n "${name:-}" ]; then ynh_app_setting_delete --app="$app" --key="name" fi -if [ -z "$admin_email" ]; then +if [ -z "${admin_email:-}" ]; then admin_email="$email" ynh_app_setting_set --app="$app" --key="admin_email" --value="$admin_email" fi -if [ -n "$email" ]; then +if [ -n "${email:-}" ]; then ynh_app_setting_delete --app="$app" --key="email" fi