From 7a1f5c1d99d57a9490c369655d2749afb601cd3e Mon Sep 17 00:00:00 2001 From: Tiago Cruz Date: Thu, 21 Mar 2019 09:45:44 -0300 Subject: [PATCH] moved $DBHOST to psql case --- zabbix-dump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix-dump b/zabbix-dump index 7ceb634..f8cee5c 100755 --- a/zabbix-dump +++ b/zabbix-dump @@ -287,6 +287,7 @@ case $DBTYPE in ;; psql) [ ! -z "$DBSOCKET" ] && DB_OPTS=("${DB_OPTS[@]}" -h $DBSOCKET) + [ ! -z "$DBHOST" ] && DB_OPTS=("${DB_OPTS[@]}" -h $DBHOST) [ ! -z "$DBUSER" ] && DB_OPTS=("${DB_OPTS[@]}" -U $DBUSER) DB_OPTS=("${DB_OPTS[@]}" -p"$DBPORT") if [ ! -z "$DBPASS" ]; then @@ -298,7 +299,6 @@ case $DBTYPE in [ ! -z "$DBNAME" ] && DB_OPTS_BATCH=("${DB_OPTS_BATCH[@]}" -d $DBNAME) ;; esac -[ ! -z "$DBHOST" ] && DB_OPTS=("${DB_OPTS[@]}" -h $DBHOST) # Log file for errors ERRORLOG=$(mktemp)