From 92273532514f02961399a9ae1ac0e00a931b5bf5 Mon Sep 17 00:00:00 2001 From: Lucas Montoya Date: Thu, 22 Aug 2024 10:40:02 -0300 Subject: [PATCH] Move cron process to foreground - Execute checkBackgroundProcesses in background - Execute cron process in foreground to keep the container alive - Remove 'sleep infinity' trick in case cron is enabled --- docker/files/scripts/start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/files/scripts/start.sh b/docker/files/scripts/start.sh index 5160397bad..aee56ac8c0 100755 --- a/docker/files/scripts/start.sh +++ b/docker/files/scripts/start.sh @@ -68,9 +68,9 @@ curl -k http://"$SITE_NAME"/API/SystemAPI?method=runPendingDatabaseUpdates # Start Cron if [ "$ASPEN_CRON" == "yes" ]; then - service cron start php /usr/local/aspen-discovery/code/web/cron/checkBackgroundProcesses.php "$SITE_NAME" & + cron -f -L 2 +else +/bin/bash -c "trap : TERM INT; sleep infinity & wait" fi -# Infinite loop -/bin/bash -c "trap : TERM INT; sleep infinity & wait" \ No newline at end of file