Results 1 to 3 of 3
Sorry if the title sounds vague or I word the following badly. I'm fairly new to Linux, I've used it but not for anything other than very basic stuff.
Here ...
- 09-06-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 4
Run a script and exit terminal upon completion
Sorry if the title sounds vague or I word the following badly. I'm fairly new to Linux, I've used it but not for anything other than very basic stuff.
Here is the situation.
I want to call a script that starts Tomcat 5. The script will call a .sh file called catalina.sh. If any of you have used Tomcat and started it this way you will know that it will start up pretty fast and a message will hang in the terminal saying it's started up. When you run shutdown.sh you will see a shutdown message and you will be then be able to resume typing commands etc into the terminal. What I want to do is to be able to call a script (in my case start_tomcat.sh) that starts tomcat (calls catalina.sh) and then when Tomcat is shutdown the terminals close instead of remaining there.
I did the same in Windows and it was a case of putting
start /min cmd /c myfile.bat
Hope that helps, if I wasn't clear enough then say and I will try clear it up. Hope you guys can help.
- 09-06-2011 #2
Hello and Welcome!
As far as using Tomcat... nope. Never have.
But as far as closing the terminal window afterwards, try appending & exit to the last line if your script.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 09-06-2011 #3Just Joined!
- Join Date
- Sep 2011
- Posts
- 4
Hey, thanks for the welcome.
It worked, catalina.sh run & exit. Worked a treat. Thank you.


Reply With Quote