We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

chrisaiv on 03/08/08


Tagged


Versions (?)


Tomcat startup & stop scripts for OS X


Published in: Bash 


Tomcat expects certain environment variables to be defined before it starts. Make two scripts and save them as start_tomcat & stop_tomcat respectively (No File Extension). Then make them executable with this. chisaiv$ chmod ug+x start_tomcat stop_tomcat. Then finally run your scripts like so chrisaiv$ /usr/local/bin/start_tomcat


  1. /************************************
  2. Startup Script
  3. ************************************/
  4. #!/bin/sh
  5. export CATALINA_HOME=/usr/local/apache-tomcat-6.0.16/
  6. export JAVA_HOME=/Library/Java/Home
  7. $CATALINA_HOME/bin/startup.sh
  8.  
  9.  
  10.  
  11. /************************************
  12. Startup Script
  13. ************************************/
  14. #!/bin/sh
  15. export CATALINA_HOME=/usr/local/apache-tomcat-6.0.16/
  16. export JAVA_HOME=/Library/Java/Home
  17. $CATALINA_HOME/bin/shutdown.sh

Report this snippet 

You need to login to post a comment.