From: arjen Date: Thu, 13 Feb 2003 08:04:34 +0000 (+0000) Subject: Check for exiting daemons in the log entries X-Git-Tag: V0_0_5~27 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=5b84d8b6f87591c9b97a00e69badbbc4beb2766b Check for exiting daemons in the log entries --- 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); + } } } }