----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Hi jon!

you have posted my starting scripts for the manual start of JServ in the
FAQ-O-Matic, thanks ;-). After just posting it, I've made further testings
and finally made it all in ONE script. So, following, I got the new version
of the script and the new description, of what it is doing.

I think it is helpfull, if you could update that entry.
Thanks,
Roland!

------------------------------
New Posting:
------------------------------

Hi,

I have just finished a little script, which enables the manual start of
ApacheJServ. I think, as I searched long enough for such a script, many
are interested in that so I am posting it.

I have made this script with my 1 year experience in linux, so if anyone
think�s there is something to be made better, I would be very grateful
for your response. The script �s made whith and for SuSe Linux and it�s
startup-directory (/sbin/init.d/), but surely can be easily used on other
linux/unix-platforms.

The script works with the arguments �start� and �stop�. In the script
you define first, which user starts JServ. There is a little output
('ApacheJServ 1.1' or starting errors on startup and 'send signal'
on stop) that I think should be logged in the mod_jserv-file, since
errors occuring on startup are than on a verified position.

Don�t forget, you have to define the virtual machine
startup-parameters, even if they are already noted in the �jserv.properties�
(the values there that start with "wrapper" only apply for the
automatic start of JServ). I have noted all parameters and their
�jserv-properties�-correspondence, that was important for me - so
maybe you have to do some changes there.

Of course, for using this script on startup (best in a priority higher
than apache) you have to set "ApJServManual=on" in the 'jserv.conf'-file.

The script was written and tested with SuSe Linux 6.3, apache 1.3.9,
JServ1.1, jdk1.2.2, JSDK2.0 on IBM PC i686.

Hope, I could help somebody whith that,
Roland Becker.


-----------------------------------
/sbin/init.d/jserv
-----------------------------------
#!/bin/sh

# Apache-JServ-Starting-Script

# Created by Roland Becker, 2000
# All comments are welcome: [EMAIL PROTECTED]
# No Guarantees!

# Give the username for exection
JSERVUSER=becker

# Logfile for nohup-Output
JSERVLOG=/usr/local/apache/jserv/logs/mod_jserv.log

# Give path an name of the java executable;
# parameter 'wrapper.bin' in 'jserv.properties'
JAVABIN=/usr/lib/jdk1.2.2/bin/java

# Give additional parameters for the Java interpreter such as '-Xms20M'
# parameter 'wrapper.parameters' in 'jserv.properties'
JAVABINPARAMETERS=-Xms20m\ -Xmx20m

# Give, colon-separated, all classpaths for the virtual machine
# ALL 'wrapper.classpath'-entries in 'jserv.properties'
JSERVCLASSPATH=/usr/local/apache/jserv/libexec/ApacheJServ.jar:/usr/lib/JSDK
2.0/lib/jsdk.jar:/usr/lib/:/usr/lib/mm.mysql.jdbc-2.0pre4:/home/becker/resou
rces

# Give the position of the 'jserv.properties'-file to use for this
# virtual machine
JSERVPROPERTIES=/usr/local/apache/jserv/etc/jserv.properties


mode=$1

case "$mode" in
  'start')
    # Start JServ

    if test -x $JAVABIN
    then
      nohup su -c "$JAVABIN -classpath $JSERVCLASSPATH $JAVABINPARAMETERS
org.apache.jserv.JServ $JSERVPROPERTIES" $JSERVUSER>>$JSERVLOG&
    else
      echo "Can't execute $JAVABIN"
    fi
    ;;

  'stop')
    # Stop JServ
      su -c "$JAVABIN -classpath $JSERVCLASSPATH $JAVABINPARAMETERS
org.apache.jserv.JServ $JSERVPROPERTIES -s" $JSERVUSER>>$JSERVLOG&
    ;;

  *)
    # usage
    echo "usage: $0 start|stop"
    exit 1
    ;;
esac




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to