From 0b1273256db5e2adedd1cc72b94971249583aaed Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 May 2021 23:23:42 +0200 Subject: [PATCH] Fix --- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 19 ++----------------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/manifest.json b/manifest.json index 670c59d..2052e42 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 6bb3391..42e0f48 100644 --- a/scripts/install +++ b/scripts/install @@ -70,7 +70,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version # Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +#ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 807341c..7adc44b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,23 +82,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=10 - # Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - cp -a "$final_path/config.json" "$tmpdir/config.json" - - # Remove the app directory securely - ynh_secure_remove --file=$final_path - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$final_path - - #Copy the admin saved settings from tmp directory to final path - cp -a "$tmpdir/config.json" "$final_path/config.json" - - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + ynh_setup_source --dest_dir=$final_path --keep="$final_path/config.json" fi #================================================= @@ -120,7 +105,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version # Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +#ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" #================================================= # SPECIFIC UPGRADE