diff options
author | jim-p <jimp@pfsense.org> | 2013-10-01 17:01:07 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-10-01 17:01:07 -0400 |
commit | ee3039e1f65a745c857c1c5bb9a4f93d419b29f8 (patch) | |
tree | 3f509059cac80dde70501304b991f7f2be068879 | |
parent | bc62d8f94ff492595dfad5e6152998fe12153645 (diff) | |
download | pfsense-packages-ee3039e1f65a745c857c1c5bb9a4f93d419b29f8.tar.gz pfsense-packages-ee3039e1f65a745c857c1c5bb9a4f93d419b29f8.tar.bz2 pfsense-packages-ee3039e1f65a745c857c1c5bb9a4f93d419b29f8.zip |
Refinements/fixes for arpwatch e-mail
-rw-r--r-- | config/arpwatch.xml | 7 |
1 files changed, 5 insertions, 2 deletions
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 @@ <fielddescr>Enable E-mail Notifications</fielddescr> <fieldname>enable_email</fieldname> <type>checkbox</type> - <description>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</description> + <description>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</description> </field> </fields> <custom_php_global_functions> @@ -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", |