Unverified Commit 6271da47 authored by Daniel Jiang's avatar Daniel Jiang Committed by GitHub
Browse files

Update health check script for harbor-db (#12103)

This patch remove the trailing space of the hostname introduced by
`hostname -i`.

The trailing space will cause resolution error after this patch is
applied to glibc in photon:
https://github.com/vmware/photon/blob/2.0/SPECS/glibc/glibc-fix-CVE-2019-10739.patch

Signed-off-by: default avatarDaniel Jiang <jiangd@vmware.com>
parent a032c546
#!/bin/bash
set -eo pipefail
host="$(hostname -i || echo '127.0.0.1')"
h="$(hostname -i || echo '127.0.0.1')"
host="${h%%[[:space:]]*}" #remove the trailing space
user="${POSTGRES_USER:-postgres}"
db="${POSTGRES_DB:-$POSTGRES_USER}"
export PGPASSWORD="${POSTGRES_PASSWORD:-}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment