From a790893c47518c9ae6e5987c5eb1947ece3d780b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Wed, 18 Jan 2023 11:16:36 +0100 Subject: [PATCH] Getting detailed info --- scripts/ynh_mongo_db__2 | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 1153dc7..e60c2c2 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -319,16 +319,12 @@ ynh_install_mongo() { # Make sure MongoDB is started and enabled # systemctl enable $mongodb_servicename --quiet # systemctl daemon-reload --quiet + ynh_exec_err uname -a - # Test mongod to see if it crashes - ynh_exec_err /usr/bin/mongod --help - ynh_exec_err which mongod - ynh_exec_err ldd /usr/bin/mongod - ynh_exec_err ls -al /usr/bin/mongod - - # sleep 60 - # pkill mongod - # ynh_exec_err cat /var/log/mongodb/mongod.conf + # crash mongod and display log + /usr/bin/mongod --help 1> mongo-crash.txt 2>&1 + ynh_exec_err ls -al /var/log + ynh_exec_err cat -n 30 /var/log/syslog ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60