From: Antoine Beaupre Date: Wed, 22 Jun 2011 03:20:12 +0000 (-0400) Subject: add inotify class to start reprepro watcher on boot X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=55cc893077e41a98e71707667b170901e2d4f1bd;p=puppet-reprepro.git add inotify class to start reprepro watcher on boot --- diff --git a/manifests/init.pp b/manifests/init.pp index 5879991..9058ca3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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"] ], + } +}