OpenVZ Forum - RDF feed
type: channel
items: How to auto restart network service
items: Re: How to auto restart network service

How to auto restart network service
type: item
description: 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
creator: ricoche
date: 2008-02-09T04:47:35-00:00

Re: How to auto restart network service
type: item
description: 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
creator: shuaib85
date: 2008-02-09T08:24:21-00:00