Annotation of StartupItems/Tomcat/Tomcat, revision 1.1
1.1 ! casties 1: #!/bin/sh
! 2:
! 3: . /etc/rc.common
! 4:
! 5: ##
! 6: # Start up the ZOPE database server on Mac OS X / Darwin
! 7: #
! 8: #
! 9: # History
! 10: # -------
! 11: #
! 12: # 2002-08-21 Marc Liyanage <liyanage@access.ch>
! 13: # Changed startup to use pg_ctl
! 14: #
! 15: # 2002-08-19 Ed Silva <ed@septicus.com>
! 16: # Modified startup script to conform
! 17: # to new SystemStarter format for Mac OS X 10.2
! 18: #
! 19: # 2001-04-02 Marc Liyanage <liyanage@access.ch>
! 20: # First version
! 21: #
! 22: # 2001-12-02 Johan Henselmans <johanhenselmans@mac.com>
! 23: # Enhanced after carefully studying the Frontbase
! 24: # startup sequence ;-)
! 25: # Now provides a stop procedure for a graceful shutdown
! 26: # and a hard kill if the clean shutdown doesn't work.
! 27: #
! 28: # 2001-12-02 Marc Liyanage <liyanage@access.ch>
! 29: # Added localized startup messages in 7 languages
! 30: # by adapting the resources of the Apple-supplied
! 31: # "Sendmail" startup script.
! 32: #
! 33: #
! 34: # License
! 35: # -------
! 36: #
! 37: # The PostgreSQL BSD-style license applies to this file
! 38: #
! 39:
! 40: TOMCATDIR=/docuserver/tomcat
! 41: TOMCATUSER=admin
! 42:
! 43: StartService ()
! 44: {
! 45:
! 46: if [ "${TOMCAT:=-YES-}" = "-YES-" ]; then
! 47: ConsoleMessage "Starting Tomcat server"
! 48: su $TOMCATUSER -c "$TOMCATDIR/bin/startup.sh"
! 49: fi
! 50: }
! 51:
! 52: StopService()
! 53: {
! 54:
! 55: ConsoleMessage "Stopping Tomcat server"
! 56: su $TOMCATUSER -c "$TOMCATDIR/bin/shutdown.sh"
! 57: #x=`/bin/ps axc | /usr/bin/grep postgres`
! 58: #if /bin/test "$x"
! 59: #then
! 60: # set $x
! 61: # kill -9 $x
! 62: #fi
! 63:
! 64: }
! 65:
! 66: RestartService ()
! 67: {
! 68: StopService
! 69: StartService
! 70: }
! 71:
! 72:
! 73: RunService "$1"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>