add warning when container was restarted

This commit is contained in:
casperklein 2024-01-24 22:57:36 +01:00
parent 00018e7e2b
commit 445c2070af
1 changed files with 6 additions and 2 deletions

View File

@ -180,8 +180,12 @@ _setup
_run_user_patches _run_user_patches
_start_daemons _start_daemons
# marker to check if container was restarted if [[ -f /CONTAINER_START ]]; then
date >/CONTAINER_START _log 'warn' "docker-mailserver was restarted, which is not supported. This can lead to unexpected behaviour. Use 'docker compose up --force-recreate' to use a fresh container."
else
# create marker to check if container was restarted
date >/CONTAINER_START
fi
_log 'info' "${HOSTNAME} is up and running" _log 'info' "${HOSTNAME} is up and running"