tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schlaefcke <cschlaef...@wms-network.de>
Subject Re: AW: Tomcat 4.1.18 - Startup script for linux not working
Date Wed, 15 Jan 2003 14:13:36 GMT
Hi,

>which linux distro + version do you use?
>seems to be something like RH ?

It is (RH 8.0).

>  "daemon" is a well known function there (often used by shell scripts in the
>/etc/init.d directory).
>
>if it is RH:
>
>the function "daemon" calls:
>
>initlog -c "su - $user -c \"$*\""
>
>                 $* should stand for:  $TOMCAT_SCRIPT start
>
>  it should do the same as in "normal case":
>   su - $TOMCAT_USER -c "$TOMCAT_SCRIPT start"

As is, I think you didn´t saw that second line coming from a bad CR due to 
the mail reply

<snip>
When I replace the line: "daemon --user $TOMCAT_USER ### BAD BAD CARRIAGE 
RETURN ###
$TOMCAT_SCRIPT start" ### HERE WE GO ON
</snip>

and that would do what you say, but it´s not working.


>however, and here is the problem in your case:
>  the "line" should be:
>                         daemon --user $TOMCAT_USER -c "$TOMCAT_SCRIPT start"
>for successful working....

You mean "daemon --user $TOMCAT_USER $TOMCAT_SCRIPT start"
Without "-c" and quotes because that comes

 > initlog -c "su - $user -c \"$*\""
                               ^^ <- here, if I get you right.


Pasted from file again:
[...]
start() {
     echo -n "Starting $TOMCAT_PROG: "

     if [ -x /etc/rc.d/init.d/functions ]; then
         daemon --user $TOMCAT_USER $TOMCAT_SCRIPT start # NOT WORKING
     else
         su - $TOMCAT_USER -c "$TOMCAT_SCRIPT start" # WORKING IF MOVED UP
     fi

     RETVAL=$?
     echo
     [ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat4
     return $RETVAL
}
[...]

Regards,

Chris 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message