Re: Missing WebObjects StartupItem on 5.2.3
Re: Missing WebObjects StartupItem on 5.2.3
- Subject: Re: Missing WebObjects StartupItem on 5.2.3
- From: steve stout <email@hidden>
- Date: Tue, 16 Mar 2004 20:25:06 -0700
What's different? I can't see anything changed.
.steve
On Mar 16, 2004, at 8:06 PM, Pierre Frisch wrote:
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.
///---------------------------------------
steve stout
web coordinator
arizona student unions
52o.626.o1o9
http://www.union.arizona.edu
_______________________________________________
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.