Skip to content

Commit

Permalink
moved $DBHOST to psql case
Browse files Browse the repository at this point in the history
  • Loading branch information
tiago-cruz-movile committed Mar 21, 2019
1 parent dfef0ca commit 7a1f5c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zabbix-dump
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 7a1f5c1

Please sign in to comment.