supervisor.conf default location

前端 未结 3 494
遥遥无期
遥遥无期 2021-02-05 08:52

Im trying to make automatic deployment including supervisord and confused by default settings path.

Every deployment scheme I found use /etc/supervisor/supervisor

3条回答
  •  情话喂你
    2021-02-05 09:29

    Normally the default file is indeed /etc/supervisor.conf, but the Debian distribution patches this (link to the gzipped patch as provided by Debian) to look for /etc/supervisor/supervisor.conf first:

    --- supervisor-3.0a8.orig/src/supervisor/options.py
    +++ supervisor-3.0a8/src/supervisor/options.py
    @@ -105,7 +105,7 @@
         def default_configfile(self):
             """Return the name of the found config file or raise. """
             paths = ['supervisord.conf', 'etc/supervisord.conf',
    -                 '/etc/supervisord.conf']
    +                 '/etc/supervisor/supervisord.conf', '/etc/supervisord.conf']
             config = None
             for path in paths:
                 if os.path.exists(path):
    

    So with that patch, supervisor looks for supervisord.conf in the local directory, in the etc/ subdirectory, then in the global /etc/supervisor/ and /etc/ directories.

    The default supervisord.conf file installed by Debian has this at the end:

    [include]
    files = /etc/supervisor/conf.d/*.conf
    

    causing supervisord to load any extra files put in the conf.d directory.

提交回复
热议问题