Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Sean Santry http://seansantry.com

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

StartupItem Script for Tomcat on OS X 10.3

#!/bin/sh
        
##
# Start Tomcat
##

. /etc/rc.common

export JAVA_HOME=/Library/Java/Home
export CATALINA_HOME="/usr/local/tomcat"
export TOMCAT_HOME="/usr/local/tomcat"

StartService ()
{

	if [ "${TOMCAT:=-NO-}" = "-YES-" ]; then

	    ConsoleMessage "Starting Tomcat"
            sh ${TOMCAT_HOME}/bin/startup.sh
	fi

}

StopService()
{

	ConsoleMessage "Stopping Tomcat"
    sh ${TOMCAT_HOME}/bin/shutdown.sh
}

RestartService ()
{
    StopService
    StartService
}


RunService "$1"
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS