blob: 8008183820163e62d44df64dd409fb4479c5507f (
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
|
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"],
}
exec { "join channel":
command => "echo '/j $channel' > /var/lib/ii/$nick/$server/in",
user => nobody,
refreshonly => true,
}
}
}
|