From ee3039e1f65a745c857c1c5bb9a4f93d419b29f8 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 1 Oct 2013 17:01:07 -0400 Subject: Refinements/fixes for arpwatch e-mail --- config/arpwatch.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/arpwatch.xml b/config/arpwatch.xml index 18c75029..64aadcea 100644 --- a/config/arpwatch.xml +++ b/config/arpwatch.xml @@ -93,7 +93,7 @@ Enable E-mail Notifications enable_email checkbox - Sends an E-mail notification for each new station and ARP change as they are seen.<br/>NOTE: Only works on pfSense 2.1 or later.<br/>Configure SMTP and address settings in System > Advanced on the Notifications tab + Sends an E-mail notification for each new station and ARP change as they are seen <strong>instead of</strong> local reports.<br/>NOTE: Only works on pfSense 2.1 or later. <br/>NOTE 2: Disables local reports which rely on arpwatch debug mode, which does not work with e-mail notifications.<br/>Configure SMTP and address settings in System > Advanced on the Notifications tab @@ -110,13 +110,16 @@ $int = $config['installedpackages']['arpwatch']['config'][0]['interface']; } $mail = ""; + $debug = ""; if(($pf_version > 2.0) && (isset($_POST['enable_email']) || ($config['installedpackages']['arpwatch']['config'][0]['enable_email'] == "on"))) { if (!empty($config['notifications']['smtp']['notifyemailaddress'])) $mail = " -m {$config['notifications']['smtp']['notifyemailaddress']}"; + } else { + $debug = "-d"; } $int = convert_friendly_interface_to_real_interface_name($int); $start = "touch {$log_file}\n"; - $start .= "/usr/local/sbin/arpwatch -d -f {$log_file} -i {$int} {$mail} > /var/log/arpwatch.reports 2>&1 &"; + $start .= "/usr/local/sbin/arpwatch {$debug} -f {$log_file} {$mail} -i {$int} > /var/log/arpwatch.reports 2>&1 &"; $stop = "/usr/bin/killall arpwatch"; write_rcfile(array( "file" => "arpwatch.sh", -- cgit v1.2.3