Re: running a shell script in the init file

Kevin Williams <[email protected]>
Newsgroups gmane.org.user-groups.linux.pdxlug
Message-ID <[email protected]>
On Thu, 2004-12-09 at 12:07, Dylan Reinhardt wrote:
> On Thu, 9 Dec 2004 10:45:12 -0800 (PST), Dave doughnut Fogarty
> <[email protected]> wrote:
> > One should, of course, keep in mind that "theDJBway" is just that.  It is
> > not the RedHat way.
> 
> True enough, and well worth pointing out.
> 
> 
> > If you start to head down the DJB path, you'll loose
> > a lot of help from a lot of people.
> 
> That's still a winning proposition if you also lose some of the
> difficulties that adherants to the "Red Hat Way" have learned to live
> with.  :-)
> 
> $.02, YMMV, etc,
> 
> Dylan

Thanks for all the responses--they were very helpful.  Since I'm
installing this for a client who has very little linux experience, but
does have funds to have purchased a license agreement, I have decided to
stick with the "Redhat" way.  More likely to get support if anything
happens in the future.

With that being said, I was able to successfully create the daemons I
needed.  Having done this I did come up with a couple of questions where
I was hoping to get clarification:

1.  Within the init scripts, after all the setup, the actual start
command (where the executable is) was always prefaced with the word
"daemon", like: daemon $INIT_PROG $INIT_OPTIONS  Does anyone know what
the word daemon is for?

2.  In all other scripts, the command is called without the & at the end
of the line.  Mine runs a perl script and a bash shell.  The bash shell
I was forced to put the & in so that the startup process didn't hang. 
Do most of the executables do this by default, and are therefore not
needed?  The perl script had a -detach option, so the & wasn't needed. 
Is that how most daemon programs run, or is there some other way that
I'm missing that forces the application to run in the background (not
hang when calling /etc/init.d/[app] start)?

Thanks for the help and the clarification on all this! 

Kevin Williams
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.