]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
and enable monit from inittab: what could go wrong?
authorStephen Gran <steve@lobefin.net>
Sun, 25 Apr 2010 14:13:21 +0000 (15:13 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 25 Apr 2010 14:13:21 +0000 (15:13 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/monit/manifests/init.pp

index efa8689d6430d854e49a151de0cc386ea707b774..63ad03c83f5630de05b8365d7913c006e2557a98 100644 (file)
@@ -1,7 +1,21 @@
 class monit {
     package { "monit": ensure => installed }
 
+    augeas { "inittab":
+        context => "/files/etc/inittab",
+        changes => [ "set mo/runlevels 2345",
+                     "set mo/action respawn",
+                     "set mo/process \"/usr/sbin/monit -d 300 -I -c /etc/monit/monitrc -s /var/lib/monit/monit.state\"",
+                   ],
+        onlyif => "match mo size == 0",
+        notify => Exec["init q"],
+    }
+
+
     file {
+        "/etc/rc2.d/S99monit":
+          ensure  => absent;
+
         "/etc/monit/":
           ensure  => directory,
           owner   => root,