Skip to content

Commit

Permalink
Restore entrypoint arg handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Oct 1, 2024
1 parent 775b1cd commit 01d4253
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions docker/scripts/entrypoint-replication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,20 @@ echo "---- end file system ----"

# Check if the command is found
command -v ppdb-replication >/dev/null 2>&1 || { echo "ppdb-replication command not found"; exit 1; }

echo "Found ppdb-replication command"

# _CMD=(
# "ppdb-replication"
# "${PPDB_REPLICATION_MON_LOGGER:+--mon-logger $PPDB_REPLICATION_MON_LOGGER}"
# "${PPDB_REPLICATION_MON_RULES:+--mon-rules $PPDB_REPLICATION_MON_RULES}"
# "run"
# "${PPDB_REPLICATION_UPDATE_EXISTING:+$([ "$PPDB_REPLICATION_UPDATE_EXISTING" = "true" ] && echo --update)}"
# "${PPDB_REPLICATION_MIN_WAIT_TIME:+--min-wait-time $PPDB_REPLICATION_MIN_WAIT_TIME}"
# "${PPDB_REPLICATION_MAX_WAIT_TIME:+--max-wait-time $PPDB_REPLICATION_MAX_WAIT_TIME}"
# "${PPDB_REPLICATION_CHECK_INTERVAL:+--check-interval $PPDB_REPLICATION_CHECK_INTERVAL}"
# "${PPDB_REPLICATION_APDB_CONFIG}"
# "${PPDB_REPLICATION_PPDB_CONFIG}"
# )

#_CMD=$(printf "%s " "${_CMD[@]}" | xargs)
_CMD="ppdb-replication run ${PPDB_REPLICATION_APDB_CONFIG} ${PPDB_REPLICATION_PPDB_CONFIG}"
echo "Running ppdb-replication: $_CMD"
_CMD=(
"ppdb-replication"
"${PPDB_REPLICATION_MON_LOGGER:+--mon-logger $PPDB_REPLICATION_MON_LOGGER}"
"${PPDB_REPLICATION_MON_RULES:+--mon-rules $PPDB_REPLICATION_MON_RULES}"
"run"
"${PPDB_REPLICATION_UPDATE_EXISTING:+$([ "$PPDB_REPLICATION_UPDATE_EXISTING" = "true" ] && echo --update)}"
"${PPDB_REPLICATION_MIN_WAIT_TIME:+--min-wait-time $PPDB_REPLICATION_MIN_WAIT_TIME}"
"${PPDB_REPLICATION_MAX_WAIT_TIME:+--max-wait-time $PPDB_REPLICATION_MAX_WAIT_TIME}"
"${PPDB_REPLICATION_CHECK_INTERVAL:+--check-interval $PPDB_REPLICATION_CHECK_INTERVAL}"
"${PPDB_REPLICATION_APDB_CONFIG}"
"${PPDB_REPLICATION_PPDB_CONFIG}"
)
_CMD=$(printf "%s " "${_CMD[@]}" | xargs)
echo "Running: $_CMD"
$_CMD

0 comments on commit 01d4253

Please sign in to comment.