1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wekan_ynh.git synced 2024-09-03 20:36:09 +02:00

Upgrade ynh_mongo_db

This commit is contained in:
yalh76 2020-08-06 04:53:47 +02:00
parent 7f723c5f0a
commit b42397cd9b
5 changed files with 11 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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