I use an rc script to start an application server (gunicorn), which needs to consult configuration files for PostgreSQL. These files are placed in the home directory of the user running gunicorn, but PostgreSQL does not find them there. When placing the files in a system-wide config directory (/usr/local/etc/postgresql) and referencing its full path (/home/www/.pgpass), everything works, but I wonder why /home/www is not checked automatically (as per the PostgreSQL documentation). On my local development machine (macOS), the files are found in the gunicorn user's home directory without absolute paths. Is the
$HOME variable not set to the user running a process in the rc script?