issue warning in case of improper restart (#3129)

This commit is contained in:
Georg Lauterbach 2023-03-01 16:33:54 +01:00 committed by GitHub
parent 0949f16344
commit f3edcf9cd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View file

@ -58,6 +58,8 @@ chmod a+x ./setup.sh
**Use `docker compose up / down`, not `docker compose start / stop`**. Otherwise, the container is not properly destroyed and you may experience problems during startup because of inconsistent state. **Use `docker compose up / down`, not `docker compose start / stop`**. Otherwise, the container is not properly destroyed and you may experience problems during startup because of inconsistent state.
Using `Ctrl+C` **is not supported either**!
You are able to get a full overview of how the configuration works by either running: You are able to get a full overview of how the configuration works by either running:
1. `./setup.sh help` which includes the options of `setup.sh`. 1. `./setup.sh help` which includes the options of `setup.sh`.

View file

@ -33,6 +33,7 @@ function _register_functions
# ? >> Checks # ? >> Checks
_register_check_function '_check_improper_restart'
_register_check_function '_check_hostname' _register_check_function '_check_hostname'
_register_check_function '_check_log_level' _register_check_function '_check_log_level'

View file

@ -17,6 +17,17 @@ function _check
done done
} }
function _check_improper_restart
{
_log 'debug' 'Checking for improper restart'
if [[ -f /CONTAINER_START ]]
then
_log 'warn' 'This container was (likely) improperly restarted which can result in undefined behavior'
_log 'warn' 'Please destroy the container properly and then start DMS again'
fi
}
function _check_hostname function _check_hostname
{ {
_log 'debug' 'Checking that hostname/domainname is provided or overridden' _log 'debug' 'Checking that hostname/domainname is provided or overridden'