14 |
$nick = $name |
$nick = $name |
15 |
|
|
16 |
include ii::base |
include ii::base |
17 |
|
# a custom wrappper is needed since ii do not fork in the |
18 |
|
# background, and bash is not able to properly do it |
19 |
|
local_script { "ii_$nick": |
20 |
|
content => "ii/ii_wrapper.pl", |
21 |
|
require => Class['ii::base'], |
22 |
|
} |
23 |
|
|
24 |
service { 'ii': |
service { 'ii': |
25 |
provider => base, |
provider => base, |
26 |
start => "su nobody -c 'nohup ii -n $nick -i /var/lib/ii/$nick -s $server'", |
start => "/usr/local/bin/ii_$nick", |
27 |
notify => Exec["join channel"], |
notify => Exec["join channel $nick"], |
28 |
require => Class['ii::base'], |
require => Local_script["ii_$nick"], |
29 |
} |
} |
30 |
|
|
31 |
exec { "join channel": |
exec { "join channel $nick": |
32 |
command => "echo '/j $channel' > /var/lib/ii/$nick/$server/in", |
command => "echo '/j $channel' > /var/lib/ii/$nick/$server/in", |
33 |
user => nobody, |
user => nobody, |
34 |
refreshonly => true, |
refreshonly => true, |