From 7b02f257d9ef3d6e034b4ed13d5254c48ed4fa4f Mon Sep 17 00:00:00 2001 From: Anthony Lagrene Date: Mon, 15 Apr 2024 04:12:01 +0000 Subject: [PATCH] Add defaultuser / dbuser for --alldb option --- check_postgres.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_postgres.pl b/check_postgres.pl index d88cad7..6303cc2 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2126,7 +2126,11 @@ sub msg_en { if ($opt{port}[0]){ $pg_port = $opt{port}[0]; } - my $psql_output = join(",", map /^([\w|-]+?)\|/, qx{$PSQL -A -l -t -p $pg_port }); + my $pg_user = $opt{defaultuser}; + if ($opt{dbuser}[0]){ + $pg_user = $opt{dbuser}[0]; + } + my $psql_output = join(",", map /^([\w|-]+?)\|/, qx{$PSQL -U $pg_user -A -l -t -p $pg_port }); my $pg_db; # optionally exclude or include each db my @psql_output_array = split(/,/, $psql_output); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy