Auto start Resin 2.0.4 under Linux 7.1

From: David Nardini - BT Connect <d_nardini@xxx.com>
Date: Sat Dec 08 2001 - 17:11:13 PST

Dear all,

I'm trying to get the start-up script (see below) to work under Linux 7.1.
I've taken the supplied script (Resin-2.0.4/contrib/init.resin.in sample)
and modified it as follows and placed in :

    /etc/rc.d/init.d/resin

I'm running the stand-alone version using port 80 for the HTTP server, and
as such, commented out the 'USER' in the following. However, it still does
not seem to start up at boot-up-time. If I run './httpd.sh start' from the
resin-2.0.4/bin all is well (as root).

Can somebody help me with what I have omitted in the following ? or send a
sample of code from a working setup ? I'm trying to understand what the
following means :

  # You can change this to $RESIN_HOME/bin/resin if you need Resin to
  # bind to port 80, but run as a different user.
  #
  EXE=$RESIN_HOME/bin/httpd.sh

Any advice welcome ;-)

David N.

=== START of file '/etc/rc.d/init.d/resin' ===
#!/bin/sh
#
# Linux startup script for Resin
#
# chkconfig: 345 85 15
# description: Resin is a Java Web server.
# processname: wrapper.pl
#
# To install, configure this file as needed and copy init.resin
# to /etc/rc.d/init.d as resin. Then use "# /sbin/chkconfig resin reset"
#
JAVA_HOME=/usr/java/jdk1.3.1_01
RESIN_HOME=/usr/resin-2.0.4
PID=$RESIN_HOME/resin.pid

export JAVA_HOME RESIN_HOME
#
# If you want to start the entire Resin process as a different user,
# set this to the user name. If you need to bind to a protected port,
# e.g. port 80, you can't use USER, but will need to use bin/resin.
#
#USER=
#
# You can change this to $RESIN_HOME/bin/resin if you need Resin to
# bind to port 80, but run as a different user.
#
EXE=$RESIN_HOME/bin/httpd.sh
#
# Sets the commandline arguments.
#
ARGS=-java_home $JAVA_HOME -resin_home $RESIN_HOME

case "$1" in
  start)
 echo -n "Starting resin: "
 if test -n "$USER"; then
     su $USER -c "$EXE -pid $PID start $ARGS"
 else
     $EXE -pid $PID start $ARGS
        fi
 echo
 ;;
  stop)
 echo -n "Shutting down resin: "
 $EXE -pid $PID stop
 echo
 rm -f $PID
 ;;
  restart)
 $0 stop
 $0 start
 ;;
  *)
 echo "Usage: $0 {start|stop|restart}"
 exit 1
esac

exit 0
=== END of file '/etc/rc.d/init.d/resin' ===
Received on Sat 08 Dec 2001 17:11:13 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:16:52 PDT