OpenVZ Forum


Home » General » Support » How to auto restart network service
How to auto restart network service [message #27095] Sat, 09 February 2008 04:47 Go to next message
ricoche is currently offline  ricoche
Messages: 17
Registered: January 2008
Location: Nagano Japan
Junior Member
Hi there,

Does anyone know how to configure the HN Node to run "service network restart" when it fails? I am having a network failure once a day and until I find the problem I need a way to auto restart when the network stops.

Thanks,

Jim

[Updated on: Sat, 09 February 2008 04:50]

Report message to a moderator

Re: How to auto restart network service [message #27098 is a reply to message #27095] Sat, 09 February 2008 08:24 Go to previous message
shuaib85 is currently offline  shuaib85
Messages: 59
Registered: September 2007
Member
You might need to write a shell script that keeps checking the status. and once it fails it will restart.

I am not on my machine now so the script might look like this

status= `service network status`

if status == " network is stopped" #check the output
do
service network start
done


run it in infinite loop

I wish this help


WebVZ: OpenVZ Web Management Tool
http://webvz.sourceforge.net
Previous Topic: RRDTool - Create
Next Topic: Are dcachesize values supposed to be 0's?
Goto Forum:
  


Current Time: Sun Aug 11 13:34:50 GMT 2024

Total time taken to generate the page: 0.02882 seconds