]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
this may break a lot ...
authorStephen Gran <steve@lobefin.net>
Thu, 5 Jan 2012 21:42:12 +0000 (21:42 +0000)
committerStephen Gran <steve@lobefin.net>
Thu, 5 Jan 2012 21:42:12 +0000 (21:42 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/monit/manifests/init.pp

index 5e8da8c81937d1d22f5075e385dda7d29f77d806..5c28c88b94daa504f3563c77b557dd7fe963b4c7 100644 (file)
@@ -1,11 +1,16 @@
 class monit {
     package { "monit": ensure => installed }
 
+    $cmd = $::lsbdistcodename == sid or $lsbmajdistrelease > 6 ? {
+         true    => /usr/bin/monit,
+         default => /usr/sbin/monit,
+    }
+
     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\"",
+                     "set mo/process \"$cmd -d 300 -I -c /etc/monit/monitrc -s /var/lib/monit/monit.state\"",
                    ],
         onlyif => "match mo size == 0",
         notify => Exec["init q"],