FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-03-2007, 12:37 PM
 
Default Linux Startup

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?




--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-03-2007, 01:46 PM
"Mikkel L. Ellertson"
 
Default Linux Startup

tony.chamberlain@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!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 11:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org