* debian/pg_createconfig_patroni: Fix error handling if port is already in use.

This commit is contained in:
Michael Banck 2019-01-15 16:58:06 +01:00
parent ba9d9787cd
commit 9c475d93c7

View file

@ -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