From 5b84d8b6f87591c9b97a00e69badbbc4beb2766b Mon Sep 17 00:00:00 2001 From: arjen Date: Thu, 13 Feb 2003 08:04:34 +0000 Subject: [PATCH] Check for exiting daemons in the log entries --- src/gcm_daemon/classes/gnucomo.process_log.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gcm_daemon/classes/gnucomo.process_log.php b/src/gcm_daemon/classes/gnucomo.process_log.php index 734ceac..dee50fc 100644 --- a/src/gcm_daemon/classes/gnucomo.process_log.php +++ b/src/gcm_daemon/classes/gnucomo.process_log.php @@ -367,6 +367,15 @@ function linux_daemon() { $local_sql = "INSERT INTO log_adv_daemon (logid, detailed_table, service, event) VALUES "; $local_sql .= "('".$dbms->db_result_row[0]."', 'log_adv_daemon', '".$dbms->db_result_row[3]."', 'start')"; $dbms_working->query($local_sql); + } else { + //As the word start this is an else for restart. + //If we wouldn't do so restart would also give a positive on start + $pos = strpos($local_log_line, "exiting"); + if ($pos > 0) { + $local_sql = "INSERT INTO log_adv_daemon (logid, detailed_table, service, event) VALUES "; + $local_sql .= "('".$dbms->db_result_row[0]."', 'log_adv_daemon', '".$dbms->db_result_row[3]."', 'start')"; + $dbms_working->query($local_sql); + } } } } -- 2.11.0