[CentOS] best way to start and shutdown programs in CentOS?
killscript at gmail.com
Wed Nov 24 09:20:17 EST 2010
Les Mikesell wrote:
> The RedHat/Centos way of doing things is to have init scripts in
> /etc/rc.d/init.d that take at least start, stop, and restart as arguments for
> each program that should start automatically. Then for the runlevels where you
> want them to start you have a symlink where the name starts with S and the rest
> is a number to make it sort alphabetically into the order that things should
> start in /etc/rc?.d (where the ? is the runlevel). Likewise add links starting
> with 'K' in the levels where the process should be stopped. There is a
> convention for comments in the scripts so that 'checkconfig program on' can make
> the links for you. Look through some of the other scripts to see how they work.
Sorry for the stupid question here, but does the /etc/initd./scriptname
file "know" about these symlinks because of a particular comment in there?
Where and how is the best way to make these symlinks once you have the
"correct" file configuration.
More information about the CentOS