Ask Your Question
0

how to shutdown tomcat using puppet not using as service

asked 2015-09-08 12:18:41 -0500

sathyamus gravatar image

updated 2015-09-08 23:58:20 -0500

I am using the below script in Puppet 3.7 to stop the tomcat server in linux. As my shutdown.sh script has some environment variables like JAVAHOME, CATALINAHOME.

While executing the script, getting below message. Looks like here it is not able to evaluate $HOME variable.

Could not evaluate: + JAVA_HOME=/java7


exec { "start-tomcat":
  cwd => "$tomcat_directory/bin/",
  command => "shutdown.sh"
}

shutdown.sh

JAVA_HOME=$HOME/java7 ; export JAVA_HOME
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-09 01:08:26 -0500

FranzCC gravatar image

The $HOME is not automatically exported.
Check the Type Reference for exec attributes
Try to set an environment var using the environment => attribute
https://docs.puppetlabs.com/reference...

Rgds. Franz

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-09-08 12:18:41 -0500

Seen: 212 times

Last updated: Sep 09 '15