#!/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>