]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/raidmpt/manifests/init.pp
some sample rdoc
[dsa-puppet.git] / modules / raidmpt / manifests / init.pp
1 # = Class: raidmpt
2 #
3 # This class installs mpt-status and ensures the daemon is not running
4 #
5 # == Sample Usage:
6 #
7 #   include raidmpt
8 #
9 class raidmpt {
10
11         package { 'mpt-status':
12                 ensure => installed
13         }
14
15         file { '/etc/default/mpt-statusd':
16                 content => "# This file is under puppet control\nRUN_DAEMON=no\n",
17                 notify  => Exec['mpt-statusd-stop'],
18         }
19
20         exec { 'mpt-statusd-stop':
21                 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"',
22                 refreshonly => true,
23         }
24 }