LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-31-2007, 02:08 PM   #1
heropage
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Rep: Reputation: 0
cronjob to restart httpd if httpd is dead


I need a script to check the httpd status and restart it if it stop.
some like

if /etc/init.d/httpd status ="httpd stop"
then
/etc/init.d/httpd start

Thanks in advance
 
Old 10-31-2007, 02:22 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,241
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
What you probably want is a watchdog script..


http://modperlbook.org/html/5-10-3-1...watchdogs.html

http://www.ben-xo.com/v6/2006/04/25/apache-watchdog/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
httpd dead but subsys locked paleogryph Linux - Software 3 05-18-2016 11:37 AM
problems with /etc/rc.d/rc.httpd restart gawain Slackware 4 02-11-2007 11:52 AM
httpd dead but subsys locked x2000koh Linux - General 5 03-21-2005 06:26 PM
service httpd status, results in httpd dead but subsys locked squadja Red Hat 2 09-11-2004 11:31 PM
httpd dead japhthor Linux - Newbie 9 10-18-2002 03:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration