Commit e7142e5e authored by iSergio's avatar iSergio
Browse files

Add configure hosts

parent 31dc9f10
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -70,6 +70,13 @@ fi
if [[ $DB_CLUSTER == false && "$CATEGORY" == "A" ]]; then
    PGPOOL_PRIMARY_HOST=$JBOSS_PRIMARY_HOST
    PGPOOL_STANDBY_HOST=$JBOSS_STANDBY_HOST

    if ! grep -Fq "$PGPOOL_PRIMARY_HOST app-primary"; then
        echo "$PGPOOL_PRIMARY_HOST app-primary" >> /etc/hosts
    fi
    if ! grep -Fq "$PGPOOL_STANDBY_HOST app-primary"; then
        echo "$PGPOOL_STANDBY_HOST app-standby" >> /etc/hosts
    fi
fi

read -r -p "PgPool primary host (Default: $PGPOOL_PRIMARY_HOST):" _PGPOOL_PRIMARY_HOST