arpwatch: Added support for defining interface to listen.

This commit is contained in:
Timo Mkinen 2013-06-18 16:10:13 +03:00
parent ab8daf97ad
commit 71d130f882
2 changed files with 24 additions and 4 deletions

View file

@ -1,15 +1,31 @@
# Install arpwatch daemon
#
class arpwatch {
# === Parameters
#
# $interface:
# Network interface to monitor.
#
class arpwatch($interface) {
package { "arpwatch":
ensure => installed,
}
file { "/etc/sysconfig/arpwatch":
ensure => present,
content => template("arpwatch/arpwatch.sysconfig.erb"),
mode => "0644",
owner => "root",
group => "root",
require => Package["arpwatch"],
notify => Service["arpwatch"],
}
service { "arpwatch":
ensure => running,
enable => true,
hasstatus => true,
require => Package["arpwatch"],
}

View file

@ -0,0 +1,4 @@
# -u <username> : defines with what user id arpwatch should run
# -e <email> : the <email> where to send the reports
# -s <from> : the <from>-address
OPTIONS="-u arpwatch -e root -i <%= @interface %> -s 'root (Arpwatch)'"