LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-14-2012, 04:32 PM   #1
micropanther
LQ Newbie
 
Registered: Oct 2007
Location: Charlotte, NC
Distribution: Ubuntu 10.04, Davinci (MacOS/X)
Posts: 20

Rep: Reputation: 0
Question Where do I add a "service dhcp3-server restart"


0 down vote favorite
share [g+] share [fb] share [tw]


I have a remote Linux machine(Umbutu 10.04 64-bit, 250 miles away) on which a general user auto-logs-in and runs my program, called from .profile as shell my_prog. Shell is used so I can disconnect remotely without stopping the process running my_prog.

There are two IP cameras attached to this box using a separate card with four 1-Gig enets on it. At restart (or some other rare whenever?) the second camera disappears. Restarting the DHCP3-server fixes the problem. So, what I though would help, or at least be be a good work-around, would be to add a service dhcp3-server restart command to some profile that is executed by root after bootup is complete and, best of all, to set it up so my general user can execute the command from inside the program that is running.

So, where do I need to put the command(s) and how would I make it executable by the general user. I assume a set suid, but how?
 
Old 03-14-2012, 05:34 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
You may get more value by resolving the actual problem, restarting services is a hacky work-around which doesn't really gain you anything in the long run.
 
1 members found this post helpful.
Old 03-16-2012, 06:40 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,496

Rep: Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558
Sounds like your second camera is using DHCP to get IP details, why not set them static on the camera?
 
  


Reply

Tags
dhcp3, service, setuid


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting "SIOCADDRT: No such process" when running "service network restart" cmlorentz Linux - Networking 1 11-26-2010 01:06 PM
invoke-rc.d: initscript dhcp3-server, action "force-reload" failed. avinash.rao Ubuntu 0 07-27-2009 09:26 AM
"service __ restart" bash command isn't working case1984 Linux - Newbie 9 04-10-2008 02:35 PM
difference between "service smb restart" and "/etc/rc.d/init.d/smb" powah Linux - Software 1 01-17-2007 05:17 PM
counter part of "service network restart" b0nd Slackware 5 10-10-2005 06:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration