File:  [Repository] / StartupItems / Zope / Zope
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Wed Oct 15 14:52:01 2008 UTC (15 years, 7 months ago) by casties
Branches: MAIN
CVS tags: HEAD
try to add in ZEO start

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

ZDIR=/Volumes/extern
ZNAME=zopeInstance
ZEO=

StartService ()
{

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

	    ConsoleMessage "Starting Zope server $ZNAME"
	    if [ -n "$ZEO" ]
	    then
	        $ZDIR/$ZEO/bin/zeoctl start
	        sleep 10
	    fi
	    $ZDIR/$ZNAME/bin/zopectl start
	fi

}

StopService()
{

	ConsoleMessage "Stopping Zope server $ZNAME"
	$ZDIR/$ZNAME/bin/zopectl stop
    if [ -n "$ZEO" ]
	then
	    $ZDIR/$ZEO/bin/zeoctl stop
	fi
	#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>