Linux Startup

Mikkel L. Ellertson mikkel at infinity-ltd.com
Mon Dec 3 14:46:34 UTC 2007


tony.chamberlain at lemko.com wrote:
> 
> I have a program I want started at system startup time, and also
> monitored so if it dies it will be restarted.
> I see two options but problems with both:
> 
> 
> 1) Put it into /etc/inittab
> 
>      This would work, EXCEPT I need to do some stuff first.  I need to
> do a cd, and add some stuff to the
>       PATH and LD_LIBRARY_PATH.  And I can't do (as far as I can tell,
> as I tried):
> 
>         x:respawn:cd /root/inittab;
> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD";./Vms
> 
>       I think you have to run from root
> 
> 
> 
> 2) Put into /etc/rc*.d
> 
>      Then I could do all the path setup, etc, but how do I get it to
> respawn if it somehow dies?
> 
> 
Try putting the entire sequence in quotes. I am not sure it will
work, but I know that if you don't, everything after the space is
passed to the first command as parameters. If that does not work,
put it in a script, and run the script. As long as the script does
not exit, it will be fine.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071203/2b76058f/attachment-0001.sig>


More information about the fedora-list mailing list