Use pg_lsclusters -h when figuring out the port to use
This commit is contained in:
parent
3812c8d23b
commit
af96198d16
2
debian/pg_createconfig_patroni
vendored
2
debian/pg_createconfig_patroni
vendored
|
@ -60,7 +60,7 @@ fi
|
||||||
|
|
||||||
if [ -z "$PORT" ]; then
|
if [ -z "$PORT" ]; then
|
||||||
# try to guess next free port
|
# try to guess next free port
|
||||||
PORT=$(($(pg_lsclusters | tail -n +2 | awk '{print $3}' | sort -n | tail -1) + 1))
|
PORT=$(($(pg_lsclusters -h | awk '{print $3}' | sort -n | tail -1) + 1))
|
||||||
if [ "$PORT" -eq 1 ]; then
|
if [ "$PORT" -eq 1 ]; then
|
||||||
# No cluster exists yet, use default port
|
# No cluster exists yet, use default port
|
||||||
PORT=5432
|
PORT=5432
|
||||||
|
|
Loading…
Reference in a new issue