diff options
author | Antoine Beaupre <anarcat@koumbit.org> | 2011-06-21 23:20:12 -0400 |
---|---|---|
committer | Antoine Beaupre <anarcat@koumbit.org> | 2011-06-21 23:20:12 -0400 |
commit | 55cc893077e41a98e71707667b170901e2d4f1bd (patch) | |
tree | 4bf2ba5b7d7e3c2a1c48353c5df6789493dca90e /manifests | |
parent | be856169725f0abe7ac5e1633d4774b1d6c0a1d9 (diff) | |
download | puppet-reprepro-55cc893077e41a98e71707667b170901e2d4f1bd.tar.gz puppet-reprepro-55cc893077e41a98e71707667b170901e2d4f1bd.tar.bz2 |
add inotify class to start reprepro watcher on boot
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 26 |
1 files changed, 26 insertions, 0 deletions
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"] ], + } +} |