Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/usr/local/apache/bin/apachectl -M

One last thing, you need a init script to start wotaskd and Monitor at boot time. This is the one I wrote :

Code Block

#!/bin/bash

# Source function library.
. /etc/rc.d/init.d/functions

NEXT_ROOT="/opt"
export NEXT_ROOT

PATH="/bin:/usr/bin:/usr/java/jdk1.5/bin"
export PATH

USER=appserver

# See how we were called.
case "$1" in
	start)
		echo -n "Starting wotaskd and Monitor: "
		su $USER -c "$NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd -WOPort 1085 &"
		su $USER -c "$NEXT_ROOT/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 &"
		echo
		;;
	stop)
		echo -n "Shutting down wotaskd and Monitor: "
		WOTASKD_PID=`ps aux | awk '/WOPort 1085/ && !/awk/ {print $2}'`
		kill $WOTASKD_PID
		MONITOR_PID=`ps aux | awk '/WOPort 56789/ && !/awk/ {print $2}'`
		kill $MONITOR_PID
		echo
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		echo -n "Usage: $0 {start|stop|restart}"
		exit 1
esac

if [ $# -gt 1 ]; then
	shift
	$0 $*
fi

exit 0