From 4610eee5bb15a49add3b9fd4b80a328efc1af440 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 9 Jan 2021 21:59:56 +0100 Subject: [PATCH] fix --- manifest.json | 28 +++++++++++++++++++--------- scripts/install | 9 +++++---- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/manifest.json b/manifest.json index fc7d2d1..dede6ce 100644 --- a/manifest.json +++ b/manifest.json @@ -40,15 +40,6 @@ }, "example": "johndoe" }, - { - "name": "is_public", - "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, - "default": true - }, { "name": "password", "type": "password", @@ -61,6 +52,25 @@ "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." }, "example": "Choose a password" + }, + { + "name": "is_public", + "type": "boolean", + "ask": { + "en": "Is it a public application?", + "fr": "Est-ce une application publique ?" + }, + "default": true + }, + { + "name": "group_name", + "type": "string", + "ask": { + "en": "Choose a name for the group you want to create", + "fr": "Choisissez un nom pour le groupe que vous voulez créer" + }, + "default": "groupname", + "example": "groupname" } ] } diff --git a/scripts/install b/scripts/install index 896152e..0b42856 100755 --- a/scripts/install +++ b/scripts/install @@ -29,6 +29,7 @@ path_url="/" admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC password=$YNH_APP_ARG_PASSWORD +group_name=$YNH_APP_ARG_GROUPNAME app=$YNH_APP_INSTANCE_NAME @@ -133,10 +134,10 @@ cp ../conf/passwd $final_path/data/passwd ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/data/passwd" ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/data/passwd" -cp ../conf/groupname.json $final_path/groups/groupname.json +cp ../sources/groups/groupname.json $final_path/groups/$group_name.json -ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/groups/groupname.json" -ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/groups/groupname.json" +ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/groups/$group_name.json" +ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/groups/$group_name.json" #================================================= # STORE THE CONFIG FILE CHECKSUM @@ -144,7 +145,7 @@ ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" -- # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/data/passwd" -ynh_store_file_checksum --file="$final_path/groups/groupname.json" +ynh_store_file_checksum --file="$final_path/groups/$group_name.json" #================================================= # GENERIC FINALIZATION