?
Solved

Easier way to restart networking in Ubuntu?

Posted on 2008-09-29
2
Medium Priority
?
374 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
pointerstop earned 2000 total points
ID: 22602177
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
ID: 31501411
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

771 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