diff --git a/scripts/ynh_mongo_db b/scripts/ynh_mongo_db index 4a43534..82bb1ea 100644 --- a/scripts/ynh_mongo_db +++ b/scripts/ynh_mongo_db @@ -319,13 +319,10 @@ ynh_install_mongo() { # Make sure MongoDB is started and enabled systemctl is-enabled $MONGODB_SERVICENAME -q || systemctl enable $MONGODB_SERVICENAME --quiet - systemctl is-active $MONGODB_SERVICENAME -q || ynh_systemd_action --service_name=$MONGODB_SERVICENAME --action=restart + systemctl is-active $MONGODB_SERVICENAME -q || ynh_systemd_action --service_name=$MONGODB_SERVICENAME --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$MONGODB_SERVICENAME.log" # Integrate MongoDB service in YunoHost yunohost service add $MONGODB_SERVICENAME --description "MongoDB daemon" --log "/var/log/mongodb/$MONGODB_SERVICENAME.log" - - # Waiting Mongo DB to be fully started - sleep 10 } # Remove MongoDB