/[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 2640 - (show annotations) (download)
Mon Mar 19 19:44:39 2012 UTC (12 years, 1 month ago) by misc
File size: 1030 byte(s)
style cleanup
1 class ii {
2 class base {
3 package {['ii',
4 'perl-Proc-Daemon']: }
5
6 file { '/var/lib/ii/':
7 ensure => directory,
8 owner => 'nobody',
9 }
10 }
11
12 define bot( $server = 'irc.freenode.net',
13 $channel) {
14
15 $nick = $name
16
17 include ii::base
18 # a custom wrappper is needed since ii do not fork in the
19 # background, and bash is not able to properly do it
20 local_script { "ii_$nick":
21 content => template('ii/ii_wrapper.pl'),
22 require => Class['ii::base'],
23 }
24
25 service { 'ii':
26 provider => base,
27 start => "/usr/local/bin/ii_$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 creates => "/var/lib/ii/$nick/$server/$channel/in",
35 require => Service['ii'],
36 }
37 }
38 }

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.30