Script Question
David Gavin
dgavin at davegavin.com
Fri May 6 18:52:22 UTC 2005
Mike,
You need a "nohup" in there to detach the started processes from the
shell that started them - without the nohup, the children die when the
parent terminates.
i.e. sudo -b -u tomcat nohup /opt/tomcat/bin/startup.sh
Dave Gavin
On Fri, May 6, 2005 14:25, Mike McGrath said:
> I've got a publishing script for some users to publish a couple of java
> apps onto a test server. The end of the script looks like this:
>
> ## RESTART_TOMCAT gets set to 1 earlier on in the script....
> ----------------------------------------------------------
> if [ $RESTART_TOMCAT -eq 1 ]
> then
> echo "- Startup Tomcat"
> sudo -b -u tomcat /opt/tomcat/bin/startup.sh
> # sudo -b -u tomcat /opt/tomcat/bin/startup.sh &
> # sudo -u tomcat /opt/tomcat/bin/startup.sh &
> fi
> echo "- Tailing CATALINA.OUT"
> tail -f /opt/tomcat/logs/catalina.out
> ------------------------------------------------------------
>
> A user would ssh in, run the script and at the end, watch the logs roll
> by. Normally they'd hit control+C, log out and everything would be
> fine. If they just close the window though, it not only ends their
> session and kills the shell but also kills tomcat. I've commented out
> the two other ways I've tried it, neither one helps. I'm running FC3.
> Anyone know what's going on?
>
> -Mike
>
>
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>
More information about the fedora-list
mailing list