Skip to content

Commit

Permalink
Update execution of maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
jokay committed Sep 14, 2023
1 parent d8a47d8 commit 5583ef2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ if [ -n "${CONFIG_KEEP_MONTHS}" ]; then

log "Running database maintenance 'clean' (removes all data before ${REF_DATE}) ..."
# shellcheck disable=SC2086
exec java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -clean "${REF_DATE}"
java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -clean "${REF_DATE}"
fi

if [[ -n "${CONFIG_KEEP_MONTHS}" || "${CONFIG_MAINTENANCE}" == "true" ]]; then
log "Running database maintenance 'recalc' ..."
# shellcheck disable=SC2086
exec java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -recalc
java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -recalc

log "Running database maintenance 'compact' ..."
# shellcheck disable=SC2086
exec java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -compact
java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -compact
fi

log "Starting CCU-Historian using the following config:"
Expand Down

0 comments on commit 5583ef2

Please sign in to comment.