I inherited some EC2 (running AMI) instances at my new job and I am trying to figure out the method that my predecessor used to set them up. This might be a really basic question, but my knowledge of the ins and outs of runlevels and init are poor so I want to confirm.
Based on this output nginx shouldn’t be automatically started at any runlevel, right?
$ chkconfig | grep nginx nginx 0:off 1:off 2:off 3:off 4:off 5:off 6:off
The nginx init script has this comment:
chkconfig - 85 15 which I believe means no runlevels also.
However according to this I believe that the server will actually run nginx at every run level, correct?
$ ls -1 /etc/rc.d/*/*nginx /etc/rc.d/init.d/nginx /etc/rc.d/rc0.d/K15nginx /etc/rc.d/rc1.d/K15nginx /etc/rc.d/rc2.d/K15nginx /etc/rc.d/rc3.d/K15nginx /etc/rc.d/rc4.d/K15nginx /etc/rc.d/rc5.d/K15nginx /etc/rc.d/rc6.d/K15nginx
(All those K15nginx files are symlinks to ../init.d/nginx)
Is this something I should just fix (set some reasonable run levels), or is this working as intended and I should walk away (it ain’t broke, don’t fix it)?
It’s broke, fix it.
chkconfig nginx on
In your current configuration, nginx is never started automatically.
Note that the symlinks that start with
K indicate that the service will be stopped (
killed) in that runlevel. Symlinks that start with
S indicate that the service will be
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.