* debian/pg_createconfig_patroni: Make sure $HOSTIP has no spaces.

This commit is contained in:
Michael Banck 2019-01-15 16:52:55 +01:00
parent fc45e29545
commit ba9d9787cd
2 changed files with 2 additions and 1 deletions

1
debian/changelog vendored
View file

@ -5,6 +5,7 @@ patroni (1.5.3-3) UNRELEASED; urgency=medium
* debian/config.yml.in: Add @PORT@ option.
* debian/pg_createconfig_patroni: Add --port option and automatically assign
the next free pg-common port if not specified.
* debian/pg_createconfig_patroni: Make sure $HOSTIP has no spaces.
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Mon, 14 Jan 2019 22:29:11 +0100

View file

@ -73,7 +73,7 @@ HOSTNAME=$(hostname)
# set default ipv4 address in case it was not provided
if [ -z "$HOSTIP" ]; then
HOSTIP=$(ip -4 route get 8.8.8.8 | grep ^8.8.8.8 | sed s/.*src.//)
HOSTIP=$(ip -4 route get 8.8.8.8 | grep ^8.8.8.8 | sed -e s/.*src.// -e s/\ //g)
fi
echo "scope: \"$VERSION-$CLUSTER\"" >> $CONFIG_FILE