#!/bin/sh . /etc/rc.common ## # Start up the ZOPE database server on Mac OS X / Darwin # # # History # ------- # # 2002-08-21 Marc Liyanage # Changed startup to use pg_ctl # # 2002-08-19 Ed Silva # Modified startup script to conform # to new SystemStarter format for Mac OS X 10.2 # # 2001-04-02 Marc Liyanage # First version # # 2001-12-02 Johan Henselmans # Enhanced after carefully studying the Frontbase # startup sequence ;-) # Now provides a stop procedure for a graceful shutdown # and a hard kill if the clean shutdown doesn't work. # # 2001-12-02 Marc Liyanage # Added localized startup messages in 7 languages # by adapting the resources of the Apple-supplied # "Sendmail" startup script. # # # 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"