phpservermon/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp

27 lines
551 B
Puppet

# Define: supervisord:supervisorctl
#
# This define executes command with the supervisorctl tool
#
define supervisord::supervisorctl(
$command,
$process = undef,
$refreshonly = false
) {
validate_string($command)
validate_string($process)
$supervisorctl = $::supervisord::executable_ctl
if $process {
$cmd = join([$supervisorctl, $command, $process], ' ')
}
else {
$cmd = join([$supervisorctl, $command])
}
exec { "supervisorctl_command_${name}":
command => $cmd,
refreshonly => $refreshonly
}
}