mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Fix mongod service
This commit is contained in:
parent
03c2296a7a
commit
e40c6e0683
4 changed files with 4 additions and 12 deletions
|
@ -131,9 +131,7 @@ ynh_replace_string --match_string="# engine:" --replace_string=" engine: wired
|
|||
ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs01" --target_file=$MONGO_CE_CONFIG
|
||||
|
||||
ynh_exec_warn_less systemctl enable $MONGO_CE_SERVICENAME --quiet
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart
|
||||
|
||||
sleep 10
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart --log_path=/var/log/mongodb/$MONGO_CE_SERVICENAME.log --line_match="Waiting for connections"
|
||||
|
||||
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
|
||||
|
|
|
@ -60,9 +60,7 @@ ynh_replace_string --match_string="engine: wiredTiger" --replace_string="# engi
|
|||
ynh_replace_string --match_string="replication:" --replace_string="#replication:" --target_file=$MONGO_CE_CONFIG
|
||||
ynh_replace_string --match_string=" replSetName: rs01" --replace_string="" --target_file=$MONGO_CE_CONFIG
|
||||
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart
|
||||
|
||||
sleep 10
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart --log_path=/var/log/mongodb/$MONGO_CE_SERVICENAME.log --line_match="Waiting for connections"
|
||||
|
||||
# Remove a database if it exists, along with the associated user
|
||||
ynh_mongo_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
|
|
@ -99,9 +99,7 @@ ynh_replace_string --match_string="# engine:" --replace_string=" engine: wired
|
|||
ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs01" --target_file=$MONGO_CE_CONFIG
|
||||
|
||||
ynh_exec_warn_less systemctl enable $MONGO_CE_SERVICENAME --quiet
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart
|
||||
|
||||
sleep 10
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart --log_path=/var/log/mongodb/$MONGO_CE_SERVICENAME.log --line_match="Waiting for connections"
|
||||
|
||||
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
|
||||
|
|
|
@ -128,9 +128,7 @@ ynh_replace_string --match_string="# engine:" --replace_string=" engine: wired
|
|||
ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs01" --target_file=$MONGO_CE_CONFIG
|
||||
|
||||
ynh_exec_warn_less systemctl enable $MONGO_CE_SERVICENAME --quiet
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart
|
||||
|
||||
sleep 10
|
||||
ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart --log_path=/var/log/mongodb/$MONGO_CE_SERVICENAME.log --line_match="Waiting for connections"
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue