From 338b6314bbca6aae4e8f847507bd7674c938d684 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jul 2023 17:56:35 +0200 Subject: [PATCH] Rename 'app_id' question which is hella confusing x_x --- manifest.json | 2 +- scripts/install | 10 +++++----- scripts/restore | 6 +++--- scripts/upgrade | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manifest.json b/manifest.json index 58ea49a..2ee5b18 100644 --- a/manifest.json +++ b/manifest.json @@ -31,7 +31,7 @@ "arguments": { "install": [ { - "name": "app_id", + "name": "custom_webapp_id", "type": "string", "ask": { "en": "Indicate the ID of the Custom Webapp where you want to install this app", diff --git a/scripts/install b/scripts/install index d3110c5..94dd653 100755 --- a/scripts/install +++ b/scripts/install @@ -20,7 +20,7 @@ ynh_abort_if_errors # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -app_id=$YNH_APP_ARG_APP_ID +custom_webapp_id=$YNH_APP_ARG_CUSTOM_WEBAPP_ID sub_folder=$YNH_APP_ARG_SUB_FOLDER app=$YNH_APP_INSTANCE_NAME @@ -30,8 +30,8 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." -final_path=$(ynh_app_setting_get --app=$app_id --key=final_path)$sub_folder/icecoder -test -e "$(ynh_app_setting_get --app=$app_id --key=final_path)" || ynh_die --message="You don't have installed $app_id before installing this app" +final_path=$(ynh_app_setting_get --app=$custom_webapp_id --key=final_path)$sub_folder/icecoder +test -e "$(ynh_app_setting_get --app=$custom_webapp_id --key=final_path)" || ynh_die --message="You don't have installed $custom_webapp_id before installing this app" test ! -e "$final_path" || ynh_die --message="This path already contains a folder" #================================================= @@ -39,7 +39,7 @@ test ! -e "$final_path" || ynh_die --message="This path already contains a folde #================================================= ynh_script_progression --message="Storing installation settings..." -ynh_app_setting_set --app=$app --key=app_id --value=$app_id +ynh_app_setting_set --app=$app --key=custom_webapp_id --value=$custom_webapp_id ynh_app_setting_set --app=$app --key=sub_folder --value=$sub_folder #================================================= @@ -53,7 +53,7 @@ ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app_id:www-data "$final_path" +chown -R $custom_webapp_id:www-data "$final_path" #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index 9a60143..cdfe93d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -25,7 +25,7 @@ ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) -app_id=$(ynh_app_setting_get --app=$app --key=app_id) +custom_webapp_id=$(ynh_app_setting_get --app=$app --key=custom_webapp_id) sub_folder=$(ynh_app_setting_get --app=$app --key=sub_folder) #================================================= @@ -33,7 +33,7 @@ sub_folder=$(ynh_app_setting_get --app=$app --key=sub_folder) #================================================= ynh_script_progression --message="Validating restoration parameters..." -test -e "$(ynh_app_setting_get --app=$app_id --key=final_path)" || ynh_die --message="You don't have installed $app_id before installing this app" +test -e "$(ynh_app_setting_get --app=$custom_webapp_id --key=final_path)" || ynh_die --message="You don't have installed $custom_webapp_id before installing this app" test ! -e "$final_path" || ynh_die --message="This path already contains a folder" #================================================= @@ -47,7 +47,7 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app_id:www-data "$final_path" +chown -R $custom_webapp_id:www-data "$final_path" #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 29618e6..103686d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,7 +16,7 @@ ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -app_id=$(ynh_app_setting_get --app=$app --key=app_id) +custom_webapp_id=$(ynh_app_setting_get --app=$app --key=custom_webapp_id) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -59,7 +59,7 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app_id:www-data "$final_path" +chown -R $custom_webapp_id:www-data "$final_path" #================================================= # GENERIC FINALIZATION