Skip to content

Commit cfaad77

Browse files
authored
Merge pull request hestiacp#1431 from guicapanema/staging/fixes
Fixes psql command in v-update-sys-rrd-pgsql
2 parents 02236c6 + 03fcfca commit cfaad77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/v-update-sys-rrd-pgsql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ for host in $hosts; do
7676
done
7777

7878
export PGPASSWORD="$PASSWORD"
79-
sql="psql -h $HOST -U $USER -c"
79+
sql="psql -h $HOST -U $USER"
8080

8181
# Checking empty vars
8282
if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ]; then
@@ -88,7 +88,7 @@ for host in $hosts; do
8888
# Parsing data
8989
q='SELECT SUM(xact_commit + xact_rollback), SUM(numbackends)
9090
FROM pg_stat_database;'
91-
status=$($sql plsql -d postgres -c "$q" 2>/dev/null); code="$?"
91+
status=$($sql -d postgres -c "$q" 2>/dev/null); code="$?"
9292
if [ '0' -ne "$code" ]; then
9393
active=0
9494
slow=0

0 commit comments

Comments
 (0)