Hello List, I was told to post this into a appropriate Tomcat mailing list and I think this should be the right one.
I wrote a little script which may be interesting for the tomcat-project. It is based on the file "apachectl" and this is what it is about: When I installed tomcat on my Server I missed something what I could put in my /etc/rc.d/rcX.d-directories. Besides: the startup- und shutdown-files are fine, but with them I can't decide which user I want to run tomcat under. So I wrote a skript to fixes this problems. I attached it to this mail. Maybe you find this usefull and put it into the /bin-directory of the tomcat-distribution. Best regards Stephan Sann ----------------------------------------------------------------- CiBes - Computerinstallations- und Beratungsservice Inhaber: Stephan Sann, Hefehof 8 (c/o medienPARK), 31785 Hameln 0700 FON CIBES (0700 366 24237), 0700 FAX CIBES (0700 329 24237) eMail: [EMAIL PROTECTED], Internet: http://www.cibes.de
#!/bin/sh # # Tomcat control script designed to start up Tomcat at boot-time and # shutdown it on system halt. Written by Stephan Sann 07.12.2001 # # The exit codes returned are: # 0 - operation completed successfully # 1 - # 2 - usage error # 3 - tomcat could not be started # 4 - tomcat could not be stopped # # When multiple arguments are given, only the error from the _last_ # one is reported. Run "tomcatctl help" for usage info # # # |||||||||||||||||||| START CONFIGURATION SECTION |||||||||||||||||||| # -------------------- -------------------- # # User to run Tomcat TOMCATUSER="nobody" # # the path to your tomcat-installation TOMCATDIR="/usr/local/jakarta-tomcat-4.0.1" # # -------------------- -------------------- # |||||||||||||||||||| END CONFIGURATION SECTION |||||||||||||||||||| ERROR=0 ARGV="$@" if [ "x$ARGV" = "x" ] ; then ARGS="help" fi for ARG in $@ $ARGS do case $ARG in start) if su - $TOMCATUSER -c $TOMCATDIR/bin/startup.sh; then echo "$0 $ARG: tomcat started" else echo "$0 $ARG: tomcat could not be started" ERROR=3 fi ;; stop) if su - $TOMCATUSER -c $TOMCATDIR/bin/shutdown.sh; then echo "$0 $ARG: tomcat stopped" else echo "$0 $ARG: tomcat could not be stopped" ERROR=4 fi ;; *) echo "usage: $0 (start|stop|help)" cat <<EOF start - start tomcat stop - stop tomcat help - this screen EOF ERROR=2 ;; esac done exit $ERROR
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>