blob: e9d5770fe14ba3e713de1e5b143d7904c579c390 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
class ii {
class base {
package { "ii": }
file { "/var/lib/ii/":
ensure => directory,
owner => nobody,
}
}
define bot($server = 'irc.freenode.net',
$channel) {
$nick = $name
include ii::base
service { 'ii':
provider => base,
start => "su nobody -c 'ii -n $nick -i /var/lib/ii/$nick -s $server'",
notify => Exec["join channel"],
require => Class['ii::base'],
}
exec { "join channel":
command => "echo '/j $channel' > /var/lib/ii/$nick/$server/in",
user => nobody,
refreshonly => true,
}
}
}
|