#!/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 StartService () { if [ "${ZOPE:=-YES-}" = "-YES-" ]; then ConsoleMessage "Starting Zope server $ZNAME" $ZDIR/$ZNAME/bin/zopectl start fi } StopService() { ConsoleMessage "Stopping Zope server $ZNAME" $ZDIR/$ZNAME/bin/zopectl stop #x=`/bin/ps axc | /usr/bin/grep postgres` #if /bin/test "$x" #then # set $x # kill -9 $x #fi } RestartService () { StopService StartService } RunService "$1"