#1 (permalink)  
Old 05-15-2008, 06:56 AM
Member
 
Join Date: Dec 2007
Posts: 92
Default How do I restart a daemon ?

To restart them from the shell, must be logged in as root to do this.
Just type,

root@host [~]# ls /etc/init.d/



It will display which are all the services running in the server.

For Eg: named, exim, nfs, ypbind, iptables are the few daemons.Let's say
that named/bind is down and we need to restart it. As root, simply type


/etc/init.d/named start



It will start the named service.To restart the web service, just type

/etc/init.d/httpd start


/etc/init.d/cpanel restart ==> It will restart the cpanel.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-21-2008, 01:16 AM
Junior Member
 
Join Date: May 2008
Posts: 1
Default

Our website goes offline too often - how can we set up a script that will automatically restart the virtuozzo container and its services when the website is offline? Where should the script go so that it will run? Will a cron job run when the website is offline?

Some code to start with:

ping -c 1 [ip address here] > /dev/null

if [ "$?" -eq 1 ] ; then
[restart services code here]
fi

Anyone have a script like this or know how to do it?

It seems like the server goes offline due to spamming, as it is always during the midnight hours USA time...all other times the server is well below the limits...today's server offline time seems due to server issues though.

Thanks.

Last edited by coffee; 08-21-2008 at 01:21 AM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-22-2008, 02:42 AM
Moderator
 
Join Date: Feb 2008
Posts: 195
Default

Hi,

I guess you are Roxanne or somebody who is associated with gymchat. In that case the script has been setup on the main nodes for both the vps's you are having. I hope this helps.

Cheers !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:10 AM.


Powered by: vBulletin
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15