Versions Compared

Key

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

...

Code Block
description     "Start webobjectswotaskd servicesservice"
author          "David LeBer"

start on runlevel [2345]
stop on runlevel [!2345]

env USER=appserver
env NEXT_ROOT=/opt
env WOTASKD_LOG=/var/log/webobjects/wotaskd.log
env WOMONITOR_LOG=/var/log/webobjects/womonitor.log

respawn
respawn limit 15 5

script
        echo "Launching wotaskd"
        su - $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd -WOPort 1085 >> $WOTASKD_LOG 2>&1"
        emit wotaskd_running
end script

Drop the above into /etc/init/ (note NOT init.d) and start it initially with:

Code Block
service       echo "Launching womonitor"
        su - $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 >> $WOMONITOR_LOG 2>&1"
        emit womonitor_running
end script

Comment out the JavaMonitor part if you don't use the Monitor on that server (you need a wotaskd on each host, but only one monitor for a given set of hosts).
Drop the above into /etc/init/ (note NOT init.d) and start it initially with:

Code Block
service webobjects startwebobjects start

. Make a similar script for womonitor if needed.

Info

Don't forget to change the permissions on the startup file so that the owner is root and that everyone have execution rights!

Code Block
chown root /etc/init.d/webobjects
chmod 755 /etc/init.d/webobjects

...