LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-04-2011, 03:45 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 486

Rep: Reputation: 31
How to auto-start the processes one after another is started?


I have two script under /etc/init.d/ 'jboss' and 'client'. By machine-reboot these two scripts will be run.

But what I want now is: The 'client' can only be run after the 'jboss' is successfully up.

How to do?

Regards

Thomas
 
Old 08-04-2011, 06:24 AM   #2
minnarky
LQ Newbie
 
Registered: Nov 2010
Location: MN
Distribution: Fedora and RHEL
Posts: 20

Rep: Reputation: 2
rename the client script to zzclient (or any letter that comes after j), I believe they are processed in alphabetical order.
 
0 members found this post helpful.
Old 08-04-2011, 09:07 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 486

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by minnarky View Post
rename the client script to zzclient (or any letter that comes after j), I believe they are processed in alphabetical order.
are U sure?
 
Old 08-04-2011, 04:35 PM   #4
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Quote:
are U sure?
Why did you not you try, or test this out, for yourself, instead of reposting?
And you appear to be lazy when you type "U" instead of "you". Please spell your words properly.

But bash has the && operator:
Code:
#!/bin/bash
script1 && script2
means that script2 will only execute if script1 ran without errors.

So maybe use that.
 
Old 08-05-2011, 10:05 AM   #5
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,386

Rep: Reputation: 808Reputation: 808Reputation: 808Reputation: 808Reputation: 808Reputation: 808Reputation: 808
Quote:
Originally Posted by minnarky View Post
rename the client script to zzclient (or any letter that comes after j), I believe they are processed in alphabetical order.
No, for sysVinit the order is determined by the symlinks in /etc/rc.d/rcX.d (where X is the runlevel). See SysVinit explained. Bsd style init (used by Slackware) has a different system.
 
  


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
Redirecting output of background processes after they've been started (BASH) DaneM Programming 18 08-08-2011 09:03 PM
How to kill remote processes started with SSH? gjb1002 Linux - General 15 08-26-2009 03:35 PM
Priority of processes (using nice) started from within a script podollb Linux - Software 1 01-08-2006 11:44 AM
monitor processes to be notified when a new process is started? cfh Programming 2 10-03-2005 07:07 PM
several processes started more than once at boot j-ray Linux - General 2 05-13-2004 12:37 PM


All times are GMT -5. The time now is 08:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration