mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
fix mongo version
This commit is contained in:
parent
ae160d5a3a
commit
95f2d2b780
2 changed files with 10 additions and 4 deletions
|
@ -6,11 +6,11 @@
|
|||
|
||||
nodejs_version=14
|
||||
|
||||
mongo_version=5.0
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="apt-transport-https build-essential gzip curl fontconfig graphicsmagick"
|
||||
|
||||
YNH_MONGO_VERSION=4.4
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -25,11 +25,11 @@ port=$(ynh_app_setting_get --app=$app --key=port)
|
|||
password=$(ynh_app_setting_get --app=$app --key=password)
|
||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
email=$(ynh_app_setting_get --app=$app --key=email)
|
||||
mongo_version=$(ynh_app_setting_get --app=$app --key=mongo_version)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking version..."
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
|
@ -75,6 +75,12 @@ if ynh_legacy_permissions_exists; then
|
|||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
# If mongo_version doesn't exist, create it
|
||||
if [ -z "$mongo_version" ]; then
|
||||
mongo_version="$(mongod --version | grep -oP 'db version v\K.{0,3}')"
|
||||
ynh_app_setting_set --app=$app --key=mongo_version --value=$mongo_version
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -107,7 +113,7 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=7
|
|||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_exec_warn_less ynh_install_mongo
|
||||
ynh_exec_warn_less ynh_install_mongo --mongo_version=$mongo_version
|
||||
ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue