Skip to content

Instantly share code, notes, and snippets.

@nibalizer
Created February 8, 2014 02:01
Show Gist options
  • Select an option

  • Save nibalizer/8875536 to your computer and use it in GitHub Desktop.

Select an option

Save nibalizer/8875536 to your computer and use it in GitHub Desktop.
class jstatd (
$manage_service = false,
){
file { "${::puppet_user_home}/jstatd":
source => 'puppet:///modules/jstatd/jstatd',
mode => '0755',
owner => $::puppet_user,
group => $::puppet_group,
ensure => absent,
} ->
file { "/opt/app/tibco/tibco_amx_rt/tibcojre64/1.6.0/bin/jstatd":
source => 'puppet:///modules/jstatd/jstatd',
mode => '0755',
owner => $::puppet_user,
group => $::puppet_group,
ensure => file ,
} ->
file { "${::puppet_user_home}/jstatd.all.policy":
source => 'puppet:///modules/jstatd/jstatd.all.policy',
mode => '0644',
owner => $::puppet_user,
group => $::puppet_group,
}
if $manage_service {
if $::puppet_user != 'tibco' {
fail("Class jstatd only makes sense for the tibco user")
}
service { 'jstatd':
ensure => running,
start => '/opt/app/tibco/tibco_amx_rt/tibcojre64/1.6.0/bin/jstatd -J-Djava.security.policy=/opt/app/home/tibco/jstatd.all.policy &',
status => 'pgrep -lf jstatd',
stop => 'pkill jstatd',
require => File["${::puppet_user_home}/jstatd.all.policy"],
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment