From c6f389eca69ab2797b0d5a645c349083b36164c5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 24 Jul 2021 23:31:43 +0200 Subject: [PATCH] Update install --- scripts/install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 21f7acf..af27002 100644 --- a/scripts/install +++ b/scripts/install @@ -123,6 +123,15 @@ pushd $final_path/programs/server ynh_exec_as $app env $ynh_node_load_PATH npm install 2>/dev/null popd +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Configuring a systemd service..." --weight=1 + +ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" + +ynh_add_systemd_config + #================================================= # MODIFY A CONFIG FILE #================================================= @@ -135,18 +144,9 @@ sed -i "s/^#replication:/replication:\n replSetName: 01-rs/" /etc/mongod.conf ynh_exec_warn_less systemctl enable mongod --quiet ynh_systemd_action --service_name=mongod --action=restart -#mongo --eval "printjson(rs.initiate())" +mongo --eval "printjson(rs.initiate())" -#sleep 10 - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" - -ynh_add_systemd_config +sleep 10 #================================================= # INTEGRATE SERVICE IN YUNOHOST