Dear,
I have a script to start tomcat. I post here the main part of that script - called mytomcat.bash
Code:
function start()
{
shift
trap "" HUP
/usr/local/java/bin/java [some_options] \ org.apache.catalina.startup.Bootstrap "$@" start 2>&1 | /usr/local/httpd/bin/rotatelogs /usr/local/catalina/logs/catalina.log 86400 &
}
It run well:
Code:
./mytomcat.bash start
But the terminal will hang when i exit.
I tried with nohup like this:
Code:
nohup ./mytomcat.bash start &
It's can release the terminal.
But I want to use nohup
inside my script, I tested with this:
Code:
nohup /usr/local/java/bin/java [some_options] \ org.apache.catalina.startup.Bootstrap "$@" start 2>&1 | /usr/local/httpd/bin/rotatelogs /usr/local/catalina/logs/catalina.log 86400 &
I doesn't release the terminal.
Anyone can help?
Thank you.