From d2570d3aab411bd305c1fe9f38b59b046db865ce Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Nov 2021 10:06:01 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 21ecc44..fe265e6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,8 +136,15 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Configuring a mongod..." --weight=1 -echo -e "replication:\n replSetName: \"rs01\"" | tee -a /etc/mongod.conf +sed -i "s/^# engine:/ engine: wiredTiger/" /etc/mongod.conf +sed -i "s/^#replication:/replication:\n replSetName: rs01/" /etc/mongod.conf +ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet +ynh_systemd_action --service_name=$mongodb_servicename --action=restart + +sleep 10 + +mongo --eval "printjson(rs.initiate())" #================================================= # SETUP LOGROTATE #=================================================