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"