X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fraidmpt%2Fmanifests%2Finit.pp;h=2d84af155480b153ca8233292fec1de7a21ff9a0;hb=3e35d1b6aa4d108dc55df6e6775971351c60fc95;hp=975f56886d433eff025d13d740c323d8375ed54b;hpb=8f9af137e228d8a3c19136c989fa04530944a6e4;p=mirror%2Fdsa-puppet.git diff --git a/modules/raidmpt/manifests/init.pp b/modules/raidmpt/manifests/init.pp index 975f56886..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 --quiet --pidfile "$pidfile"; rm -f "$pidfile"', - 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 ts=4: -# vim:set shiftwidth=4: