From ee218168cfc25b71f6a54a6e7fe8e30ff2b8f533 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 9 May 2021 11:00:08 +0200 Subject: [PATCH] Keep config --- manifest.json | 2 +- scripts/upgrade | 35 +---------------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/manifest.json b/manifest.json index f82f919..616a853 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "win10@tutanota.com, cyp@rouquin.me" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/upgrade b/scripts/upgrade index 708fe73..3dbb9fb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,7 +112,7 @@ then ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/lufi.conf" fi #================================================= @@ -130,39 +130,6 @@ ynh_script_progression --message="Upgrading dependencies..." ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies -#================================================= -# SETUP LUFI -#================================================= -ynh_script_progression --message="Configuring Lufi..." - -config=${final_path}/lufi.conf -ynh_backup_if_checksum_is_different --file="$config" -cp ../conf/lufi.conf.template "$config" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$config" -ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$config" -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$config" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$config" -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$config" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config" -ynh_replace_string --match_string="__SECRET__" --replace_string="$secret" --target_file="$config" -ynh_replace_string --match_string="__MAX_FILE_SIZE__" --replace_string="$max_file_size" --target_file="$config" -if [ $max_file_size -eq 0 ]; then # Comment the limitation line if no limit - ynh_replace_string --match_string="max_file_size" --replace_string="#max_file_size" --target_file="$config" -fi - -if [ $is_public -eq 0 ]; -then - ynh_replace_string --match_string="__IS_PUBLIC__" --replace_string="" --target_file="$config" -else - ynh_replace_string --match_string="__IS_PUBLIC__" --replace_string="#" --target_file="$config" -fi - -ynh_store_file_checksum --file="$config" - -chmod 600 $final_path/lufi.conf -chown $app:$app $final_path/lufi.conf - #================================================= # BUILD LUFI #=================================================