From ea3fe2ab0bc73b7774074418b0688de21d2c9135 Mon Sep 17 00:00:00 2001 From: bernhard Date: Thu, 28 May 2020 09:38:26 +0200 Subject: [PATCH 1/2] Issue #40: avoid a warning when var/tmp already exists --- bin/docker/entrypoint.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/docker/entrypoint.sh b/bin/docker/entrypoint.sh index 22e91e2a19..24f74213bb 100755 --- a/bin/docker/entrypoint.sh +++ b/bin/docker/entrypoint.sh @@ -1,14 +1,14 @@ #!/usr/bin/env bash +# no command line arguments are handled + # Start up OTOBO Daemon and the webserver # Run a watchdog over the Daemon via Cron -# no command line arguments are handled - -# start the Daemon and set up the Cron watchdog # assume that we are in /opt/otobo -# TODO: this might not work when the database is not yet created and configured -mkdir var/tmp +mkdir -p var/tmp + +# set up the cronjobs as they are declared in var/cron ./bin/Cron.sh start perl ./bin/otobo.Daemon.pl start From 304f458c448070530670ae2fcf49d597719dde84 Mon Sep 17 00:00:00 2001 From: bernhard Date: Thu, 28 May 2020 09:39:48 +0200 Subject: [PATCH 2/2] Issue #40: remove the workaround of calling 'perl bin/otobo.Daemon.pl' No longer needed as the Shebank line has been adapted --- bin/docker/entrypoint.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/docker/entrypoint.sh b/bin/docker/entrypoint.sh index 24f74213bb..4cb678edc0 100755 --- a/bin/docker/entrypoint.sh +++ b/bin/docker/entrypoint.sh @@ -10,11 +10,16 @@ mkdir -p var/tmp # set up the cronjobs as they are declared in var/cron ./bin/Cron.sh start -perl ./bin/otobo.Daemon.pl start + +# Start the Daemon. +# The Daemon will exit immediately when SecureMode = 0. +# But this is OK, as Cron will restart it and it will run when SecureMode = 1. +./bin/otobo.Daemon.pl start # maintainance jobs -# TODO: this might not work when the database is not yet created and configured +# TODO: decide whether it makes sense to run these jobs on startup #perl ./bin/otobo.Console.pl Maint::Config::Rebuild #perl ./bin/otobo.Console.pl Maint::Cache::Delete +# Start the webserver plackup --server Gazelle -R Kernel,bin/psgi-bin/otobo.psgi --port 5000 bin/psgi-bin/otobo.psgi