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?
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
|show 4 more comments|
Assuming that you're writing a network daemon, the easiest way would be to write your C program to interface to