From 759948d55961be89e3626140aae6f82f00bc48f6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 30 Jun 2022 19:34:44 +0200 Subject: [PATCH] fix mongo service --- scripts/install | 4 ++-- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) 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