Why does this process keep dying

From: Farouk Khawaja (fkhawaja@Instinet.Com)
Date: Fri Nov 29 2002 - 13:46:00 EST


Thanks in advance for your help.

The startup script below keeps dying when the telnet session is exited
and current shell is '/sbin/sh'. But if I login in, change shell to
csh, start script and exit, all is fine.

Any help would be appreciated.

#!/sbin/sh
#
# The environment variables JAVA_HOME & CATALINA_HOME need to be set
#
# Start the process
CATALINA_HOME=/www/tomcat
case "$1" in
'start')
        echo "Starting tomcat v4.0.4"
        su - tomcat -c "cd /tmp; nohup $CATALINA_HOME/bin/startup.sh"
        exit
        ;;
'stop')
        su - tomcat -c "kill -9 `ps -ef |grep java|grep tomcat|awk
'{print $2}'`"
        exit
        ;;
esac

****************************************************************************
<<Disclaimer>>

This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and/or
CONFIDENTIAL or both.

This email is intended only for the personal and confidential use
of the recipient(s) named above.

If the reader of this email is not an intended recipient, you have
received this email in error and any review, dissemination,
distribution or copying is strictly prohibited.

If you have received this email in error, please notify the sender
immediately by return mail and permanently deleting the copy
you received.

Thank you.

****************************************************************************
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:22 EDT