Created
February 8, 2014 02:01
-
-
Save nibalizer/8875536 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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