/[adm]/puppet/modules/ii/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/ii/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2262 - (show annotations) (download)
Sun Jan 15 13:41:11 2012 UTC (12 years, 3 months ago) by misc
File size: 948 byte(s)
add a custom wrapper for running ii, since it doesn't react like
a regular daemon, and doing this with simple shell command is too
tedious.
1 class ii {
2 class base {
3 package { "ii": }
4
5 file { "/var/lib/ii/":
6 ensure => directory,
7 owner => nobody,
8 }
9 }
10
11 define bot($server = 'irc.freenode.net',
12 $channel) {
13
14 $nick = $name
15
16 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':
25 provider => base,
26 start => "/usr/local/bin/ii_$nick",
27 notify => Exec["join channel $nick"],
28 require => Local_script["ii_$nick"],
29 }
30
31 exec { "join channel $nick":
32 command => "echo '/j $channel' > /var/lib/ii/$nick/$server/in",
33 user => nobody,
34 refreshonly => true,
35 }
36 }
37 }

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.30