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?
|