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:
parent
25b135a452
commit
ab01ccd577
3 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue