]> gitweb.fluxo.info Git - puppet-reprepro.git/commitdiff
add inotify class to start reprepro watcher on boot
authorAntoine Beaupre <anarcat@koumbit.org>
Wed, 22 Jun 2011 03:20:12 +0000 (23:20 -0400)
committerAntoine Beaupre <anarcat@koumbit.org>
Wed, 22 Jun 2011 03:20:12 +0000 (23:20 -0400)
manifests/init.pp

index 5879991a709ed070eb71615edc6ac9115ded4316..9058ca38e7129a6ee8bd1d6efdd5a33715e87280 100644 (file)
@@ -139,3 +139,29 @@ class reprepro {
 # setup needeed lines in apache site config file
 
 }
+
+class reprepro::inotify inherits reprepro {
+  file { "/etc/init.d/reprepro":
+      owner => root, group => root, mode => 0755,
+      source => "puppet://$server/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"] ],
+  }
+}