From da87b24aea3eb048927ec227ca290f292e22a704 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sun, 11 Sep 2005 21:16:00 +0000 Subject: Tinker with arpwatch and send all email reports to /var/log/arpwatch.reports so we can parse them in another tab. --- packages/arpwatch.xml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'packages') diff --git a/packages/arpwatch.xml b/packages/arpwatch.xml index 11320e80..61be6f35 100644 --- a/packages/arpwatch.xml +++ b/packages/arpwatch.xml @@ -16,6 +16,17 @@ arpwatch.sh arpwatch + + + Settings + /pkg_edit.php?xml=arpwatch.xml&id=0 + + + + Reports + /arpwatch_reports.php + + Listening Interface @@ -32,16 +43,9 @@ global $config; conf_mount_rw(); config_lock(); - foreach($config['installedpackages']['arpwatch']['config'] as $arpw) { - $ints = $arpw['interface']; - } - if($ints == "") { - $ints = "lan"; - log_error("Could not find a interface for arpwatch. Defaulting to LAN"); - } - global $config; - $int = convert_friendly_interface_to_real_interface_name($ints); - $start = "/usr/local/sbin/arpwatch -d -d -i {$int} | logger -p daemon.info -i -t arpwatch"; + $int = $config['installedpackages']['arpwatch']['config'][0]['interface']; + $int = convert_friendly_interface_to_real_interface_name($int); + $start = "/usr/local/sbin/arpwatch -d -i {$int} > /var/log/arpwatch.reports 2>&1"; $stop = "/usr/bin/killall arpwatch"; write_rcfile(array( "file" => "arpwatch.sh", -- cgit v1.2.3