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