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

better rs.initiate

This commit is contained in:
yalh76 2022-06-28 22:52:55 +02:00
parent 25b135a452
commit ab01ccd577
3 changed files with 9 additions and 3 deletions

View file

@ -135,7 +135,9 @@ ynh_systemd_action --service_name=$mongodb_servicename --action=restart
sleep 10
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
if ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.status())" | grep -q "no replset config has been received"; then
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
fi
#==============================================
# INSTALL ROCKETCHAT

View file

@ -103,7 +103,9 @@ ynh_systemd_action --service_name=$mongodb_servicename --action=restart
sleep 10
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
if ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.status())" | grep -q "no replset config has been received"; then
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
fi
#=================================================
# RESTORE SYSTEMD

View file

@ -132,7 +132,9 @@ ynh_systemd_action --service_name=$mongodb_servicename --action=restart
sleep 10
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
if ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.status())" | grep -q "no replset config has been received"; then
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
fi
#==============================================
# INSTALL ROCKETCHAT