* debian/pg_createconfig_patroni: Fix error handling if port is already in use.
This commit is contained in:
parent
ba9d9787cd
commit
9c475d93c7
2
debian/pg_createconfig_patroni
vendored
2
debian/pg_createconfig_patroni
vendored
|
@ -35,7 +35,7 @@ if [ -z "$PORT" ]; then
|
|||
PORT=$(($(pg_lsclusters | awk '{print $3}' | grep -v Port | sort -n | tail -1) + 1))
|
||||
else
|
||||
# validate specified port
|
||||
pg_lsclusters | awk '{print $3}' | grep -q $PORT && (echo "Port $PORT already in use"; exit 1)
|
||||
pg_lsclusters | awk '{print $3}' | grep -q $PORT && echo "Port $PORT already in use" && exit 1
|
||||
fi
|
||||
|
||||
# support both '-' and '/' as separator
|
||||
|
|
Loading…
Reference in a new issue