Skip to content
This repository was archived by the owner on Aug 26, 2019. It is now read-only.
This repository was archived by the owner on Aug 26, 2019. It is now read-only.

Ip Address Determination #1

@gdgellatly

Description

@gdgellatly

Hi,

I know you probably don't care but since I used your work I'll share back. In setting up remote connections you assume to know the network however now with named networks and proliferation of docker those addresses are no longer always the range you specify.

Anyway these are my 2 lines from your code in setting up remote connections. I happened to use md5 but otherwise it is pretty much identical.

HOST_IP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}')

sed -i "/host    all             all             127.0.0.1\/32            trust/a host    all             all             $HOST_IP            md5" $PGDATA/pg_hba.conf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions