arpwatch: Added support for defining interface to listen.
This commit is contained in:
parent
ab8daf97ad
commit
71d130f882
2 changed files with 24 additions and 4 deletions
|
@ -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"],
|
||||
}
|
||||
|
||||
|
|
4
arpwatch/templates/arpwatch.sysconfig.erb
Normal file
4
arpwatch/templates/arpwatch.sysconfig.erb
Normal 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)'"
|
Loading…
Add table
Reference in a new issue