LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 03: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, 03:54 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 04:09 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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 04:11 PM.
 
Old 03-09-2012, 09: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, 09:06 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

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


Reply



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 09:50 AM
Starting Skype from Background nedson Linux - Newbie 1 04-20-2006 03:53 AM
Starting program in background jdhar Linux - Software 1 02-21-2005 02:12 PM
rsh starting a background process clockworks Linux - Software 0 03-04-2004 09:33 AM
starting a background process running tcpdump on boot butthead Linux - Networking 1 10-15-2003 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:58 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
Open Source Consulting | Domain Registration