works for restarting apache automatically when it goes down
check the README , download it and install it
regards
theguru
Jun 7 2006, 01:57 AM
Cpanel stars Apache when its down.
I want to do it every 3 days.
eth00
Jun 7 2006, 07:40 AM
Though there is no need to if you want to restart apache every couple days a cronjob would be the best to do it automatically. You cannot do this via a reseller as you need to be root to run the commands.
JFrechA
Jun 7 2006, 08:29 AM
QUOTE (theguru)
Cpanel stars Apache when its down.
I want to do it every 3 days.
## Every three days at 6 o'clock p.m.
#crontab -e, and add the line:
0 18 */3 * * /etc/rc.d/init.d/httpd restart
theguru
Jun 7 2006, 10:06 AM
Thankyou guys for the prompt reply
So, where should I insert those lines?
"Newbie"
Hey @ JFrechA - The APF and BDF working fine, detected and banned few
texasweb
Jun 7 2006, 11:13 AM
QUOTE (theguru)
Thankyou guys for the prompt reply
So, where should I insert those lines?
"Newbie"
Hey @ JFrechA - The APF and BDF working fine, detected and banned few
su to root
then
crontab -e
then insert the line
then CTRL zz
Catalyst
Jun 7 2006, 11:18 AM
I prefer an alternative method, since `crontab -e` will sometimes double up the run-parts entries ... Create a file `/etc/cron.d/apacherestart` and drop in your stuff there:
CODE
SHELL=/bin/sh */10 * * * * root service httpd restart
theguru
Jun 7 2006, 12:29 PM
QUOTE (JFrechA)
## Every three days at 6 o'clock p.m.
#crontab -e, and add the line:
0 18 */3 * * /etc/rc.d/init.d/httpd restart
Ah! I'm sorry .. I overlooked ..
Thanx @ texasweb
Catalyst I liked your alternative way, will try it out
I'll get an email notification when the cron job runs?
JFrechA
Jun 7 2006, 03:33 PM
QUOTE (theguru)
Thankyou guys for the prompt reply
So, where should I insert those lines?
"Newbie"
Hey @ JFrechA - The APF and BDF working fine, detected and banned few
Excellent!, Have a good luck.
As texasweb said, just su - in the shell prompt, and then crontab -e and insert the line there.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.