Trying to create init script

Kanwar Ranbir Sandhu m3freak at rogers.com
Mon Nov 21 22:41:33 UTC 2005


On Mon, 2005-21-11 at 13:19 +0000, Paul Howarth wrote:
> I had the same problem when creating initscripts for the bittorrent 
> package in Fedora Extras.
> 
> See:
> http://cvs.fedora.redhat.com/viewcvs/devel/bittorrent/btseed.init?root=extras&view=markup 

Thanks for the link, Paul: it was exactly what I needed.

I incorporated what you did into the script I already had, and now it's
working great.  I'm able to start, stop, restart, and check the status
of the service.  I also added some tests for running/stopped processes.

I'm not a bash expert, which was adding to my frustration.  However,
I'll hopefully have that remedied soon as I'm currently learning the ins
and outs of it.

Just one question: what exactly is happening?  As far as I can tell, a
sub-shell is started with the application running under that shell.  The
entire thing is then put into the background.  I listed the running
processes, and had two PIDs reported, one for the shell itself and
another for the actual application.  I'm assuming that the shell exits
when the application is killed with 'killproc $prog'.  Is that about
right?

Regards

Ranbir
-- 
Kanwar Ranbir Sandhu
Systems Aligned Inc.
www.systemsaligned.com




More information about the fedora-list mailing list