Solved

Easier way to restart networking in Ubuntu?

Posted on 2008-09-29
2
320 Views
Last Modified: 2013-11-15
For some unknown reason my Ubuntu file server seems to loose it's connection to the network. I was wondering if there is a simple way in Ubunutu to create a "application" that will just perform a command line action. The command I want to invoke is:

sudo /etc/init.d/networking restart

That way I can tell someone over the phone to just run the "Restart Network" application on the desktop instead og getting them to find the terminal, type sudo etc... I don't mind them typing in the admin password, but if they didn't have to that would be super!

Thanks.
0
Comment
Question by:cawthron
2 Comments
 
LVL 5

Accepted Solution

by:
pointerstop earned 500 total points
Comment Utility
In the first place, if you really want to run "networking restart", then just right-click on the desktop, select "Create New ... Link to application", and enter the command you "sudo /etc/init.d/networking restart" as the application.

Don't forget to give the user who's going to execute that "sudo" access, via visudo

However, you'd be better off, as a temporary workaround!, writing a script that checks if the interface is up, and if not, "ups" it, then run it from cron every minute.

Even better would be to figure out what takes down the interface.
0
 

Author Closing Comment

by:cawthron
Comment Utility
Thanks pointershop.

I knew there was a a way to create apps from commands somewhere!

Will work on fixing problem this weekend, for now this fix will do - I think it has something to do with a faulty Cnet PCI network card - as I have exact same setup on another box and there is no problems. Hopefully when I swap out the card all will be fixed, if not..... I'll be back!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Join & Write a Comment

PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now