X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fraidmpt%2Fmanifests%2Finit.pp;h=2d84af155480b153ca8233292fec1de7a21ff9a0;hb=61b1f29e849df28f2892efc5f98318611e99eeeb;hp=814fd5b405467886c63e29401309046a54260a0e;hpb=7f86914b9cb237cb1cf8c720f86902bef717cfaa;p=mirror%2Fdsa-puppet.git diff --git a/modules/raidmpt/manifests/init.pp b/modules/raidmpt/manifests/init.pp index 814fd5b40..2d84af155 100644 --- a/modules/raidmpt/manifests/init.pp +++ b/modules/raidmpt/manifests/init.pp @@ -1,21 +1,24 @@ +# = Class: raidmpt +# +# This class installs mpt-status and ensures the daemon is not running +# +# == Sample Usage: +# +# include raidmpt +# class raidmpt { - package { - mpt-status: ensure => installed; - } - file { - "/etc/default/mpt-statusd": - content => "# This file is under puppet control\nRUN_DAEMON=no\n", - notify => Exec["mpt-statusd-stop"], - ; - } - exec { - "mpt-statusd-stop": - command => 'pidfile=/var/run/mpt-statusd.pid; ! [ -e "$pidfile" ] || /sbin/start-stop-daemon --oknodo --stop --signal TERM --quiet --pidfile "$pidfile"; rm -f "$pidfile"; pkill -INT -P 1 -u 0 -f "/usr/bin/daemon /etc/init.d/mpt-statusd check_mpt"', - refreshonly => true, - ; - } + package { 'mpt-status': + ensure => installed + } + + file { '/etc/default/mpt-statusd': + content => "# This file is under puppet control\nRUN_DAEMON=no\n", + notify => Exec['mpt-statusd-stop'], + } + + exec { 'mpt-statusd-stop': + command => 'pidfile=/var/run/mpt-statusd.pid; ! [ -e "$pidfile" ] || /sbin/start-stop-daemon --oknodo --stop --signal TERM --quiet --pidfile "$pidfile"; rm -f "$pidfile"; pkill -INT -P 1 -u 0 -f "/usr/bin/daemon /etc/init.d/mpt-statusd check_mpt"', + refreshonly => true, + } } -# vim:set et: -# vim:set sts=4 ts=4: -# vim:set shiftwidth=4: