diff --git a/scripts/install b/scripts/install index e8c5296..67fecea 100644 --- a/scripts/install +++ b/scripts/install @@ -130,8 +130,8 @@ ynh_script_progression --message="Configuring mongod..." --weight=1 ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file=$MONGO_CE_CONFIG ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs01" --target_file=$MONGO_CE_CONFIG -ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet -ynh_systemd_action --service_name=$mongodb_servicename --action=restart +ynh_exec_warn_less systemctl enable $MONGO_CE_SERVICENAME --quiet +ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart sleep 10 diff --git a/scripts/remove b/scripts/remove index 605123b..8528898 100644 --- a/scripts/remove +++ b/scripts/remove @@ -56,12 +56,12 @@ ynh_remove_logrotate #================================================= ynh_script_progression --message="Removing the MongoDB database..." -ynh_mongo_exec --command="printjson(rs.remove(localhost))" --eval +ynh_mongo_exec --command="printjson(rs.remove())" --eval ynh_replace_string --match_string="engine: wiredTiger" --replace_string="# engine:" --target_file=$MONGO_CE_CONFIG 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=$mongodb_servicename --action=restart +ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart sleep 10 diff --git a/scripts/restore b/scripts/restore index 3a68deb..514d35e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -98,8 +98,8 @@ ynh_script_progression --message="Configuring mongod..." --weight=3 ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file=$MONGO_CE_CONFIG ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs01" --target_file=$MONGO_CE_CONFIG -ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet -ynh_systemd_action --service_name=$mongodb_servicename --action=restart +ynh_exec_warn_less systemctl enable $MONGO_CE_SERVICENAME --quiet +ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart sleep 10 diff --git a/scripts/upgrade b/scripts/upgrade index a637851..744877b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -127,8 +127,8 @@ ynh_script_progression --message="Configuring mongod..." --weight=1 ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file=$MONGO_CE_CONFIG ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs01" --target_file=$MONGO_CE_CONFIG -ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet -ynh_systemd_action --service_name=$mongodb_servicename --action=restart +ynh_exec_warn_less systemctl enable $MONGO_CE_SERVICENAME --quiet +ynh_systemd_action --service_name=$MONGO_CE_SERVICENAME --action=restart sleep 10