summaryrefslogtreecommitdiff
path: root/manifests/inotify.pp
blob: b59faa7eb15b8e3cc758efafc86befa5b9567ca8 (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
32
33
34
35
36
37
38
39
class reprepro::inotify {

  case $::lsbdistcodename {
    etch: { 
      package {
        "inoticoming": ensure => '0.2.0-1~bpo40+1';
      }
    }
    default: {
      package {
        "inoticoming": ensure => 'installed';
      }
    }
  }

  file { "/etc/init.d/reprepro":
      owner => root, group => root, mode => 0755,
      source => "puppet:///modules/reprepro/inoticoming.init";
  }
  file { "/etc/default/reprepro":
      ensure  => present,
      owner   => root, group => root, mode => 0755,
      content => template('reprepro/inoticoming.default.erb'),
  }

  exec { "reprepro_init_script":
      command => "/usr/sbin/update-rc.d reprepro defaults",
      unless  => "/bin/ls /etc/rc3.d/ | /bin/grep reprepro",
      require => File["/etc/init.d/reprepro"],
  }
  service { "reprepro":
      ensure    => "running",
      pattern   => "inoticoming.*reprepro.*processincoming",
      hasstatus => false,
      require   => [File["/etc/default/reprepro"],
                    Exec["reprepro_init_script"],
                    File["/etc/init.d/reprepro"] ],
  }
}