From c3b767cf043bc141e9c583a74ce6437c5f1a4501 Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 15 Jan 2023 10:31:40 +0100 Subject: [PATCH 1/2] Fix typo --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6f24377..e8191fc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,7 +72,7 @@ fi [[ $YNH_APP_ID == "garradin" ]] \ && [[ "$(cat "/opt/$app/templates/.VERSION")" != 1.2.2 ]] \ - && ynh_die --message "It look like that you have an old Garradin install. You need first upgrade Gogs instance (id: $garradin_migrate_id) and after migrate to Paheko." + && ynh_die --message "It look like that you have an old Garradin install. You need first upgrade Garradin instance (id: $garradin_migrate_id) and after migrate to Paheko." ynh_handle_app_migration --migration_id=garradin --migration_list=garradin_migrations if [[ $migration_process -eq 1 ]]; then From fe8b429ccc30011605718bed4b905db9e830f7a1 Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 15 Jan 2023 10:56:13 +0100 Subject: [PATCH 2/2] Use --username argument for ynh_system_user_delete As per the documentation suggests: https://yunohost.org/fr/packaging_apps_helpers#ynh-system-user-delete --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e8191fc..da5340f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,7 +81,7 @@ if [[ $migration_process -eq 1 ]]; then db_user=$app # Replace the user - ynh_system_user_delete $old_app + ynh_system_user_delete --username="$old_app" test getent passwd "$app" &>/dev/null || \ useradd -d "$datadir" --system --user-group "$app" --shell /bin/bash || \ ynh_die --message "Unable to create $app system account"