From a33e0bfabc4fffc01477492cc0cfb2d18af7ce28 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 15 Mar 2019 16:26:05 +0100 Subject: [PATCH] Fix handling -D parameter --- check_pg_streaming_replication | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_pg_streaming_replication b/check_pg_streaming_replication index e379c9a..cdab14e 100755 --- a/check_pg_streaming_replication +++ b/check_pg_streaming_replication @@ -112,7 +112,7 @@ id "$PG_USER" > /dev/null 2>&1 [ $( echo "$PG_DEFAULT_PORT"|grep -c -E '^[0-9]*$' ) -ne 1 ] && "UNKNOWN : Postgres default master TCP port must be an integer." && exit 3 # If PG_DB is not provided with -D parameter, use PG_USER as default value -[ -z "$PB_DB" ] && PG_DB="$PG_USER" +[ -z "$PG_DB" ] && PG_DB="$PG_USER" function psql_get () { echo "$1"|su - $PG_USER -c "$PSQL_BIN -d "$PG_DB" -t -P format=unaligned"