This is good advice and my own software is following it:
$ oq info cfg
Looking at the following paths (the last wins)
/opt/openquake/oq-engine/openquake/engine/openquake.cfg
/opt/openquake/venv/openquake.cfg
However, I do not think there is any standard API to follow, I used "info cfg" but many alternatives were possible. So sysadmins have to explore to find out which is the introspection command to give. Not ideal, but I don't think there is a solution.