File:  [Repository] / StartupItems / Tomcat / Tomcat
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Thu Jun 8 18:00:02 2006 UTC (17 years, 11 months ago) by casties
Branches: MAIN
CVS tags: HEAD
Fixed up history in script file

#!/bin/sh

. /etc/rc.common

##
# Start up the ZOPE database server on Mac OS X / Darwin
# (adapted from Marc Lyanage's PostgreSQL StartupItem)
#
# License
# -------
#
# The PostgreSQL BSD-style license applies to this file
#

TOMCATDIR=/docuserver/tomcat
TOMCATUSER=admin

StartService ()
{

	if [ "${TOMCAT:=-YES-}" = "-YES-" ]; then
	    ConsoleMessage "Starting Tomcat server"
	    su $TOMCATUSER -c "$TOMCATDIR/bin/startup.sh"
	fi
}

StopService()
{

	ConsoleMessage "Stopping Tomcat server"
	su $TOMCATUSER -c "$TOMCATDIR/bin/shutdown.sh"
	#x=`/bin/ps axc | /usr/bin/grep postgres`
	#if /bin/test "$x"
	#then
	#	set $x
	#	kill -9 $x
	#fi

}

RestartService ()
{
    StopService
    StartService
}


RunService "$1"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>