Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > b35825628324473946f33b78732f3f08 > files > 13

tomcat5-5.0.27-2jpp.src.rpm

#!/bin/sh
#
# Wrapper script for Tomcat 5.0, to be sure it will allways
# be run with correct user profile (tomcat4 by default)
#
# derived from stuff in tomcat5.init
#
# Gomez Henri <hgomez@slib.fr>
# Keith Irwin <keith_irwin@non.hp.com>
# Nicolas Mailhot <nicolas.mailhot@one2team.com>
#
# version 1.01 - Fix webapps dir permissions
#


# Get Tomcat config

TOMCAT_CFG="@@@TCCONF@@@/tomcat5.conf"

[ -r "$TOMCAT_CFG" ] && . "${TOMCAT_CFG}"

# Path to the tomcat launch script
TOMCAT_SCRIPT=/usr/bin/dtomcat5

# Tomcat name :)
TOMCAT_PROG=tomcat5
        
# if TOMCAT_USER is not set, use tomcat4 
if [ -z "$TOMCAT_USER" ]; then
    TOMCAT_USER="tomcat4"
fi

RETVAL=0

su - $TOMCAT_USER -c "$TOMCAT_SCRIPT $@"
RETVAL=$?
exit $RETVAL