diff --git a/scripts/install b/scripts/install index 15e1807..0e0f49f 100644 --- a/scripts/install +++ b/scripts/install @@ -141,8 +141,8 @@ sed -i "s/^# engine:/ engine: wiredTiger/" /etc/mongod.conf sed -i "s/^#replication:/replication:\n replSetName: \"rs01\"/" /etc/mongod.conf #echo -e "replication:\n replSetName: \"rs01\"" | tee -a /etc/mongod.conf -ynh_exec_warn_less systemctl enable mongod --quiet -ynh_systemd_action --service_name=mongod --action=restart +ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet +ynh_systemd_action --service_name=$mongodb_servicename --action=restart mongo --eval "printjson(rs.initiate())" @@ -161,10 +161,8 @@ yunohost service add $app --description="Team collaboration communication platfo ynh_script_progression --message="Starting a MongoDB service..." --weight=2 # Start a mongod service -ynh_exec_warn_less systemctl enable mongod --quiet -ynh_systemd_action --service_name=mongod --action=restart - -#mongo --eval "printjson(rs.initiate())" +ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet +ynh_systemd_action --service_name=$mongodb_servicename --action=restart #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index a34008c..32a46fd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -153,7 +153,7 @@ yunohost service add $app --description="Team collaboration communication platfo #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=10 -ynh_systemd_action --service_name=mongod --action=restart --log_path=systemd +ynh_systemd_action --service_name=$mongodb_servicename --action=restart --log_path=systemd ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" #=================================================