LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2012, 04:23 PM   #1
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Rep: Reputation: 1
starting .sh in background


I login to ssh to start my weblogic server ,
to start it in background I use /opt/............./startWeblogic.sh &

will this start weblogic in background ?
all the weblgoic output shows up in console ,and sometimes when I disconnect ssh weblogic alos stops , what is the right way to start any sh in background so that even if I disconnect from linux the process should be running .
 
Old 03-08-2012, 04:54 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well the weblogic start script should complete normally, you shouldn't be backgrounding it. The script starts the jvm's and exits. So once it's exited, you should have no problem closing SSH. Does the script not terminate itself?
 
Old 03-08-2012, 05:09 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Code:
nohup startWeblogic.sh &> Weblogic.out &
That will allow you to exit the console without stopping the process.

Last edited by suicidaleggroll; 03-08-2012 at 05:11 PM.
 
Old 03-09-2012, 10:02 AM   #4
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by suicidaleggroll View Post
Code:
nohup startWeblogic.sh &> Weblogic.out &
That will allow you to exit the console without stopping the process.

I don't want to create new .out files every time I restart server
 
Old 03-09-2012, 10:06 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Then send the output to /dev/null but one day you may want to examine that output to investigate a problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
starting background programs with screen Skaperen Linux - Desktop 1 01-04-2010 10:50 AM
Starting Skype from Background nedson Linux - Newbie 1 04-20-2006 04:53 AM
Starting program in background jdhar Linux - Software 1 02-21-2005 03:12 PM
rsh starting a background process clockworks Linux - Software 0 03-04-2004 10:33 AM
starting a background process running tcpdump on boot butthead Linux - Networking 1 10-15-2003 07:34 PM


All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration