Skip to content

Commit

Permalink
Merge pull request #319 from jokay/feature/improve-stop-handling
Browse files Browse the repository at this point in the history
Improve stop handling
  • Loading branch information
jokay authored Jul 24, 2023
2 parents 4bf5d61 + 54d6036 commit fa763f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [TBA](https://github.com/jokay/docker-ccu-historian/releases/tag/TBA) (TBA)

### Improvements

- Improved stop handling. (thx to [@Vrumf0ndel](https://github.com/Vrumf0ndel))
([#318])

## [3.3.1](https://github.com/jokay/docker-ccu-historian/releases/tag/3.3.1) (2023-03-24)

This release contains CCU-Historian [3.3.1](https://github.com/mdzio/ccu-historian/releases/tag/3.3.1).
Expand Down Expand Up @@ -98,7 +105,7 @@ data. ([#10])
### Improvements

- Exposed additional ports `8082` (Database Web-GUI Port), `9092` (Database TCP
Port) and `5435` (Database PostgreSQL Port). ([#13])
Port) and `5435` (Database PostgreSQL Port). ([#13])

## 2.4.0 (2020-06-11)

Expand Down Expand Up @@ -140,3 +147,4 @@ This release contained CCU-Historian [2.2.0](https://github.com/mdzio/ccu-histor
[#29]: https://github.com/jokay/docker-ccu-historian/issues/29
[#140]: https://github.com/jokay/docker-ccu-historian/issues/140
[#148]: https://github.com/jokay/docker-ccu-historian/issues/148
[#318]: https://github.com/jokay/docker-ccu-historian/issues/318
8 changes: 4 additions & 4 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
java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -clean "${REF_DATE}"
exec 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
java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -recalc
exec java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}" -recalc

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

log "Starting CCU-Historian using the following config:"
Expand All @@ -95,4 +95,4 @@ done <"${FILE_CONFIG}"
log_sub "---"

# shellcheck disable=SC2086
java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}"
exec java ${CONFIG_JAVA_OPTS} -jar "${PATH_BASE}/ccu-historian.jar" -config "${FILE_CONFIG}"

0 comments on commit fa763f6

Please sign in to comment.