• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Missing WebObjects StartupItem on 5.2.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing WebObjects StartupItem on 5.2.3


  • Subject: Re: Missing WebObjects StartupItem on 5.2.3
  • From: Pierre Frisch <email@hidden>
  • Date: Tue, 16 Mar 2004 19:06:28 -0800

The new one has some bug correction here it is.
Pierre
=============================
#!/bin/sh
#
# Start and Stop WebObjects Services
#

. /etc/rc.common


WOSERVICE="/System/Library/WebObjects/JavaApplications/wotaskd.woa/
Contents/Resources/javawoservice.sh"

WOTASKD="/System/Library/WebObjects/JavaApplications/wotaskd.woa/
wotaskd"
WOJAVAMONITOR="/System/Library/WebObjects/JavaApplications/
JavaMonitor.woa/JavaMonitor"

GREP=/usr/bin/grep
AWK=/usr/bin/awk
PS=/bin/ps

PRINTSTARTSTOPMESSAGES="YES"

##
# Start WebObjects services
#	(Services to be stopped by this script must use "javawoservice.sh".)
##
StartService ()
{
	if [ -x "$WOSERVICE" ]; then

     	if [ "$PRINTSTARTSTOPMESSAGES" = "YES" ]; then
			ConsoleMessage "Starting WebObjects services"
		fi

     	if [ -e /var/log/webobjects.log ]; then
         	mv /var/log/webobjects.log /var/log/webobjects.log.1
     	fi

		####
		# This set of invocations will launch wotaskd and
		# (optionally) Monitor as root.  This is less secure than
                 # starting as 'appserver'

		"$WOSERVICE" -appPath "$WOTASKD" >/var/log/webobjects.log 2>&1 &

		# Uncomment the next line to start Monitor as root at boot time
		#"$WOSERVICE" -appPath "$WOJAVAMONITOR" -WOPort 56789
-WOAutoOpenInBrowser NO >>/var/log/webobjects.log 2>&1 &
		####

		####
		# OSX Server now has the 'appserver' and 'appserveradm'
                 # It is recommended that apps be started as the
'appserver' instead of 'root'
		#
		#/usr/bin/su appserver -c "$WOSERVICE -appPath $WOTASKD"
 >/var/log/webobjects.log 2>&1 &
		#
		#/usr/bin/su appserver -c "$WOSERVICE -appPath $WOJAVAMONITOR -WOPort
56789 -WOAutoOpenInBrowser NO" >> /var/log/webobjects.log 2>&1 &
		#
		####

	fi
}

##
# Stop WebObjects Services
#  	(Stop all services run by "javawoservice.sh".)
##
StopService ()
{
    	if [ "$PRINTSTARTSTOPMESSAGES" = "YES" ]; then
		ConsoleMessage "Stopping WebObjects services"
	fi

	WOSERVICEPIDS=`$PS -jaxwwwww | $GREP "$WOSERVICE" | $GREP -v grep |
$AWK '{print $2}'`

         parents=""
         children=""

	for parent in $WOSERVICEPIDS
	{
		WOSERVICECHILDPIDS=`$PS -jaxwwwww | $AWK 'NF>3 {if ( $3 =='"$parent"'
) print $2}'`
		parents="$parents $parent"

		for child in $WOSERVICECHILDPIDS
		{
			children="$children $child"
		}

	}

     #kill them all at once
	kill $parents $children
}

##
# Restart WebObjects Services
##
RestartService ()
{
	ConsoleMessage "Restarting WebObjects services"

	PRINTSTARTSTOPMESSAGES="NO"

	StopService
	StartService
}

##
# Stop Process by PID
##
StopPID ()
{
	`kill "$1"`
}

RunService "$1"

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Missing WebObjects StartupItem on 5.2.3
      • From: steve stout <email@hidden>
References: 
 >Re: Missing WebObjects StartupItem on 5.2.3 (From: Andrew Lindesay <email@hidden>)

  • Prev by Date: Re: Missing WebObjects StartupItem on 5.2.3
  • Next by Date: Re: Missing WebObjects StartupItem on 5.2.3
  • Previous by thread: Re: Missing WebObjects StartupItem on 5.2.3
  • Next by thread: Re: Missing WebObjects StartupItem on 5.2.3
  • Index(es):
    • Date
    • Thread