# how to shutdown tomcat using puppet not using as service

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 close merge delete ## 1 Answer Sort by » oldest newest most voted 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

more