From: Stephen Gran Date: Thu, 5 Jan 2012 21:42:12 +0000 (+0000) Subject: this may break a lot ... X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=32dbe8f37d2bb1b45e659b6f0436f6f960c9ece7;p=mirror%2Fdsa-puppet.git this may break a lot ... Signed-off-by: Stephen Gran --- diff --git a/modules/monit/manifests/init.pp b/modules/monit/manifests/init.pp index 5e8da8c81..5c28c88b9 100644 --- a/modules/monit/manifests/init.pp +++ b/modules/monit/manifests/init.pp @@ -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"],