I have a C program which I want to run as a daemon. How do I install it so it will run as a daemon on CentOS? Someone said to use @reboot, and some said to put it in /etc/rc.d/rc.local. Which is the right way?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
migrated from serverfault.com Dec 12 '11 at 6:42
|
Neither. If you want to have it behave properly like a real daemon you should place it using the init system - Run a search or have a look at something like this: http://serverfault.com/questions/204695/comprehensive-guide-to-init-d-scripts |
|||||||||||||
|
|
Assuming that you're writing a network daemon, the easiest way would be to write your C program to interface to |
|||||||||
|