What should be set for the chkconfig line in the RHEL init.d script for a process controller such as supervisord?

I am trying to write a init.dscript for the first time to start a process supervisord. A supervisor is a controller / process manager, for example runit, upstartor systemd. I would like it to start automatically if the system restarts, so that it can run my applications.

I used this tldp tutorial as the basis for writing a init.dscript. It works fine, but I don't understand how to change this line in the file:

# chkconfig: 2345 95 05

A note in the tutorial for this line reads:

Although these are comments, they are used by the chkconfig command and must be present. This particular line determines that at execution levels 2,3,4 and 5 this subsystem will be activated with priority 95 (one of the last) and deactivated with priority 05 (one of the first).

This RHEL doc explains the various runlevels as follows:

0 - Halt
1 - Single-user text mode
2 - Not used (user-definable_
3 - Full multi-user text mode
4 - Not used (user-definable)
5 - Full multi-user grapical mode
6 - Reboot

Of these options, I suppose I would like to run mine on 35, considering that 1 is for system administrators only.

There are several examples of supervisord scripts init.d, for example here . I noticed that all RHEL scripts init.dcontain the following line:

# chkconfig:    345 83 04

In this case, for what reason would the authors want him to be active at level 4, which is not used?

nginx init.d script :

# chkconfig:   - 86 16

- ?

?

, supervisor? 83 04, tldp 95 05.

+4
1
chkconfig:    345 83 04

, , 4, " "?

4 , , . 345 , .

chkconfig --list supervisord
chkconfig --level 4 supervisord off
chkconfig --level 3 supervisord on

nginx init.d script :

chkconfig:   - 86 16

?

, chkconfig

chkconfig:   345 86 16

?

345 run levels
86  activate priority
16  deactivate priority

, ? 83 04, tldp 95 05.

, , -.

, , , .

URL- https://rayed.com/wordpress/?p=1496

    chkconfig: 345 64 36

, chkconfig

chkconfig: - 64 36

centOS, :

yum supervisord, ,

urname -r
2.6.32-573.12.1.el6.centos.plus.x86_64

supervisord:

sudo yum install supervisor
supervisor.noarch 0:2.1-9.el6

:

cat /etc/init.d/supervisord |grep chkconfig
#chkconfig: - 95 04

/

[gliang@www prima]$ chkconfig --list supervisord
supervisord     0:off   1:off   2:off   3:off   4:off   5:off   6:off
[gliang@www prima]$ sudo chkconfig --level 3 supervisord on
[gliang@www prima]$ sudo chkconfig --level 4 supervisord off

S95 3 , ,

[gliang@www prima]$ ls -ltr /etc/rc3.d/|grep supervisor
lrwxrwxrwx. 1 root root 21 Jan 29 08:02 S95supervisord -> ../init.d/supervisord
[gliang@www prima]$ ls -ltr /etc/rc4.d/|grep supervisor
lrwxrwxrwx. 1 root root 21 Jan 29 08:02 K04supervisord -> ../init.d/supervisord

ls -ltr /etc/rc3.d/
+2

Source: https://habr.com/ru/post/1625051/


All Articles