diff --git a/supervisor/options.py b/supervisor/options.py index f3cce2680..fee6b6138 100644 --- a/supervisor/options.py +++ b/supervisor/options.py @@ -104,10 +104,14 @@ def __init__(self, require_configfile=True): self.add(None, None, "h", "help", self.help) self.add("configfile", None, "c:", "configuration=") + default_userdir = os.path.join(os.environ['HOME'], '.config') + userdir = os.environ.get('XDG_CONFIG_HOME', default_userdir) + here = os.path.dirname(os.path.dirname(sys.argv[0])) searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'), os.path.join(here, 'supervisord.conf'), 'supervisord.conf', + os.path.join(userdir, 'supervisor', 'config.conf'), 'etc/supervisord.conf', '/etc/supervisord.conf'] self.searchpaths = searchpaths