diff --git a/scripts/_common.sh b/scripts/_common.sh index 87ac1c2..02a93b8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -23,8 +23,8 @@ MONGO_DEBIAN_DEPENDENCIES="mongodb mongodb-server mongo-tools" MONGO_CE_DEPENDENCIES="mongodb-org mongodb-org-server mongodb-org-tools" MONGO_DEBIAN_CONFIG="/etc/mongodb.conf" MONGO_CE_CONFIG="/etc/mongod.conf" -MONGO_CE_REPO="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" -MONGO_CE_KEY="https://www.mongodb.org/static/pgp/server-4.4.asc" +MONGO_CE_REPO="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main" +MONGO_CE_KEY="https://www.mongodb.org/static/pgp/server-5.0.asc" # Execute a mongo command # diff --git a/scripts/install b/scripts/install index a980c92..28d623f 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,6 @@ ynh_script_progression --message="Configuring a mongod..." --weight=1 sed -i "s/^# engine:/ engine: wiredTiger/" /etc/mongod.conf sed -i "s/^#replication:/replication:\n replSetName: rs01/" /etc/mongod.conf -#echo -e "replication:\n replSetName: \"rs01\"" | tee -a /etc/mongod.conf ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet ynh_systemd_action --service_name=$mongodb_servicename --action=restart diff --git a/scripts/upgrade b/scripts/upgrade index 07d9236..21ecc44 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,6 +131,13 @@ ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --targ # Create a dedicated systemd config ynh_add_systemd_config +#================================================= +# MODIFY A CONFIG FILE +#================================================= +ynh_script_progression --message="Configuring a mongod..." --weight=1 + +echo -e "replication:\n replSetName: \"rs01\"" | tee -a /etc/mongod.conf + #================================================= # SETUP LOGROTATE #================================================= @@ -139,13 +146,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Configuring a mongod..." --weight=1 - -echo -e "replication:\n replSetName: \"rs01\"" | tee -a /etc/mongod.conf - #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================