diff --git a/README.md b/README.md index 9bf0a83..917a3f4 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,21 @@ Note that the health check itself cannot be entirely disabled as it will ensure If this variable is not present, the gateway will automatically be detected. + +* Set FHEM startup timeout: + Set a Timeout, how long the docker container waits until the FHEM process will finished starting. + If the timeout is over, and FHEM is not started, the container is stopped. + You will see an error like this in the container log, if starting wasn't finished early enough: + `ERROR: Fatal: No message from FHEM since 60 seconds that server has started.` + + If you have a slow system and a module which blocks FHEM to be ready adjust this to a higher value. + + ```shell + -e TIMEOUT_STARTING=60 + ``` + + If this variable is not present, the timeout will be 60 seconds. + * Manipulating software in the container using their own environment variables: For security reasons, only allowed environment variables are passed to the FHEM user environment. To control certain behaviours of Perl, Node.js and Python, those language interpreters come with their own environment variables. Any variable that was set for the container and with a prefix of either PERL, NODE or PYTHON is exported to the FHEM user environment so it is available there during runtime of the fhem.pl main process and subsequently all its child processes. diff --git a/src/entry.sh b/src/entry.sh index 09a32e5..f43a3bb 100755 --- a/src/entry.sh +++ b/src/entry.sh @@ -880,7 +880,7 @@ function startFhemProcess() { fi if ! waitForTextInFile "$gCurrentTailFile" "Server started" $TIMEOUT_STARTING ; then # Wait for startup message in the logfile - printfErr "Fatal: No message from FHEM that server has started.\n" + printfErr "Fatal: No message from FHEM since $TIMEOUT_STARTING seconds that server has started.\n" exit 1 fi