Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-07-2004, 09:27 AM
|
#1
|
Member
Registered: Nov 2004
Location: East Side
Distribution: Red Hat
Posts: 49
Rep:
|
auto restart service
Hi,
How can I set it to automaticly restart a service if it dies?
Because I have a service that from time to time dies out and I want it to be warking at all times.
I am running a red hat box.
Can anyone help me?
Thanks,
|
|
|
12-07-2004, 10:23 AM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Write a script that checks to see if the process is running, if its not, have the script restart it.. place this script as a cron job that runs every 5 minutes.. or every hour.. or whatever you desire..
|
|
|
12-07-2004, 10:30 AM
|
#3
|
Member
Registered: Nov 2004
Location: East Side
Distribution: Red Hat
Posts: 49
Original Poster
Rep:
|
ok thanks for the info,
the only problem is I don't really know much about making scripts 
|
|
|
12-07-2004, 12:37 PM
|
#4
|
Member
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108
Rep:
|
Run it from /etc/inittab with the action respawn. See man inittab.
|
|
|
12-07-2004, 01:46 PM
|
#5
|
Member
Registered: Nov 2004
Location: East Side
Distribution: Red Hat
Posts: 49
Original Poster
Rep:
|
hey,
I`ve been doing some reading in man, but I'm still not sure how the line in inittab should look
If for example the service was called "service" and you start it by /etc/init.d/service start
what would I add to inittab?
Thanks,
|
|
|
All times are GMT -5. The time now is 11:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|