Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add program to startup

Status
Not open for further replies.

richardko

Programmer
Jun 20, 2006
127
US
Hi,
I have a program that needs to start whenever the server is rebooted along with other programs. The program was compiled manually and I do not see the program when I type "setup" at command prompt and go to "system services". Any idea?
Thanks
ro
 
What distribution are you using?

The manual way to do it (and the way I'd do it in Debian) is to put links to the program in /etc/rcn.d/ , where n is each runlevel number in which you want the program to run. For example, you might put a link called S99myprog in /etc/rc2.d, /etc/rc3.d, /etc/rc4.d, and /etc/rc5.d.

However, runlevels vary according to the distro; you would need to check what your distro uses. You might also be better off following your distro's standard procedures for installing daemons.
 
There's a good example of a service startup script in this thread, even though it wasn't the answer for that particular thread.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top