From 4cce64005698047c6494d71e4a65d3edb3a0e59c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 3 Apr 2021 17:48:35 +0200 Subject: [PATCH] Fix --- manifest.json | 22 +--------------------- scripts/install | 14 +------------- scripts/upgrade | 9 --------- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/manifest.json b/manifest.json index deaae08..93e8ad8 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "url": "https://computhings.be" }, "requirements": { - "yunohost": ">= 4.1.0" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ @@ -27,46 +27,26 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Noalyss", - "fr": "Choisissez un nom de domaine pour Noalyss" - }, "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Noalyss", - "fr": "Choisissez un chemin pour Noalyss" - }, "example": "/noalyss", "default": "/noalyss" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the Mantis administrator", - "fr": "Choisissez l’administrateur de Mantis" - } }, { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "example": "Choose a password" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true } ] diff --git a/scripts/install b/scripts/install index 0b7844e..f2b36c8 100755 --- a/scripts/install +++ b/scripts/install @@ -131,19 +131,7 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) # ================================================= ynh_script_progression --message="Modifying $app config file..." -cp ../conf/noalyss.conf $final_path/include/config.inc.php - -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/include/config.inc.php" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/include/config.inc.php" -ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/include/config.inc.php" -ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/include/config.inc.php" - -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum "$final_path/include/config.inc.php" +ynh_add_config --template="../conf/noalyss.conf" --destination="$final_path/include/config.inc.php" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index eb213ef..0b187c0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,15 +35,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app)