From d0d32c1b1c3f47b423ca400b03b81bcbd47be9ff Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 29 Jan 2007 21:07:55 +0000 Subject: Toggle the LED on wrap/soekris when an alert is filed if /dev/led1 exists. --- etc/inc/notices.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc/inc/notices.inc') diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index 27ff7af..9c9740e 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -64,6 +64,8 @@ function file_notice($id, $notice, $category = "General", $url = "", $priority = fwrite($queueout, serialize($queue)); fclose($queueout); log_error("New alert found: {$notice}"); + if(file_exists("/dev/led1")) + exec("echo 1 > /dev/led1"); return $queuekey; } @@ -116,6 +118,8 @@ function close_notice($id) { } else { unlink_if_exists($notice_path); } + if(file_exists("/dev/led1")) + exec("echo 0 > /dev/led1"); return; } -- cgit v1.1