From b42397cd9b0e6c42dc2644cce2c6277069f734bd Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 6 Aug 2020 04:53:47 +0200 Subject: [PATCH] Upgrade ynh_mongo_db --- scripts/install | 5 ++--- scripts/remove | 3 +-- scripts/restore | 5 ++--- scripts/upgrade | 5 ++--- scripts/ynh_mongo_db | 8 ++++---- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/scripts/install b/scripts/install index 24c24fb..98ee677 100755 --- a/scripts/install +++ b/scripts/install @@ -76,11 +76,10 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." +ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejsversion ynh_use_nodejs -ynh_mongo_install - -ynh_install_app_dependencies $pkg_dependencies +ynh_install_mongo #================================================= # CREATE A MONGODB DATABASE diff --git a/scripts/remove b/scripts/remove index 41092b0..75a8b5d 100755 --- a/scripts/remove +++ b/scripts/remove @@ -62,8 +62,7 @@ ynh_script_progression --message="Removing dependencies..." # Remove metapackage and its dependencies ynh_remove_app_dependencies ynh_remove_nodejs - -ynh_mongo_remove +ynh_remove_mongo #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index 3dd1870..6263bbf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -86,11 +86,10 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750 ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejsversion ynh_use_nodejs -ynh_mongo_install - -ynh_install_app_dependencies $pkg_dependencies +ynh_install_mongo #================================================= # RESTORE THE MONGODB DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 790f73d..82bef52 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -185,12 +185,11 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." +ynh_install_app_dependencies $pkg_dependencies ynh_remove_nodejs ynh_install_nodejs --nodejs_version=$nodejsversion ynh_use_nodejs -ynh_mongo_install - -ynh_install_app_dependencies $pkg_dependencies +ynh_install_mongo #================================================= # CREATE DEDICATED USER diff --git a/scripts/ynh_mongo_db b/scripts/ynh_mongo_db index f5b2d4a..8b7c748 100644 --- a/scripts/ynh_mongo_db +++ b/scripts/ynh_mongo_db @@ -384,10 +384,10 @@ ynh_mongo_test_if_first_run() { # Install MongoDB and integrate MongoDB service in YunoHost # -# usage: ynh_mongo_install +# usage: ynh_install_mongo # # -ynh_mongo_install() { +ynh_install_mongo() { # Define Mongo Service Name if [ "$(lsb_release --codename --short)" = "buster" ]; then ynh_install_extra_app_dependencies --repo="$MONGO_REPO_BUSTER" --package="$MONGO_DEPENDENCIES_BUSTER" --key="$MONGO_KEY_BUSTER" @@ -410,10 +410,10 @@ ynh_mongo_install() { # Only remove the MongoDB service integration in YunoHost for now # if MongoDB package as been removed # -# usage: ynh_mongo_remove +# usage: ynh_remove_mongo # # -ynh_mongo_remove() { +ynh_remove_mongo() { # Only remove the mongodb service if it is not installed. if ! ynh_package_is_installed --package="mongodb*" then