Added init script for abusehelper botnets
$abusehelper_botnets is an array of botnet paths to be started at boot, for example: $abusehelper_botnets = ["/var/lib/ah2/botnet1", "/var/lib/ah2/botnet2"]
This commit is contained in:
parent
3704a86d50
commit
603df85cea
3 changed files with 123 additions and 1 deletions
|
@ -1,4 +1,12 @@
|
|||
# Install abusehelper from svn.
|
||||
# Install abusehelper.
|
||||
#
|
||||
# === Global variables
|
||||
#
|
||||
# $abusehelper_botnets
|
||||
# Array of botnet paths to start at boot.
|
||||
#
|
||||
# $abusehelper_user
|
||||
# User botnets run as. Defaults to 'abusehel'.
|
||||
#
|
||||
class abusehelper {
|
||||
|
||||
|
@ -105,4 +113,35 @@ class abusehelper {
|
|||
}
|
||||
}
|
||||
|
||||
if !$abusehelper_user {
|
||||
$abusehelper_user = "abusehel"
|
||||
}
|
||||
|
||||
if $abusehelper_botnets {
|
||||
file { "/etc/init.d/botnet":
|
||||
ensure => present,
|
||||
mode => "0755",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
source => "puppet:///modules/abusehelper/botnet.init",
|
||||
before => Service["botnet"],
|
||||
}
|
||||
file { "/etc/sysconfig/botnet":
|
||||
ensure => present,
|
||||
name => $::operatingsystem ? {
|
||||
"debian" => "/etc/default/botnet",
|
||||
"ubuntu" => "/etc/default/botnet",
|
||||
default => "/etc/sysconfig/botnet",
|
||||
},
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
content => template("abusehelper/botnet.sysconfig.erb"),
|
||||
before => Service["botnet"],
|
||||
}
|
||||
service { "botnet":
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue