diff --git a/dockerfiles/commul-customization/entrypoint.sh b/dockerfiles/commul-customization/entrypoint.sh
index c7890a495c37630858d37d45fc766d2d9890e2f1..469fa87fcd717b27425d0cf6aa9d420039f94888 100644
--- a/dockerfiles/commul-customization/entrypoint.sh
+++ b/dockerfiles/commul-customization/entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # replace environment variables in config files
 perl -pi -e 's/\$\{DSPACE_USER\}/$ENV{DSPACE_USER}/; s/\$\{DSPACE_PASSWORD\}/$ENV{DSPACE_PASSWORD}/; s/\$\{MAIL_USER\}/$ENV{MAIL_USER}/; s/\$\{MAIL_PASSWORD\}/$ENV{MAIL_PASSWORD}/; s/\$\{DSPACE_DBNAME\}/$ENV{DSPACE_DBNAME}/; s/\$\{DSPACE_UTILSDBNAME\}/$ENV{DSPACE_UTILSDBNAME}/;' /opt/repository/sources/dspace/local.properties
@@ -16,9 +16,31 @@ perl -pi -e 's/\$\{HANDLE_USER\}/$ENV{HANDLE_USER}/; s/\$\{HANDLE_PASSWORD\}/$EN
 /opt/tomcat8/bin/startup.sh
 cd /opt/repository/workspace/scripts
 make init_statistics
-make update_discovery
-make update_oai
-/opt/lindat-dspace/installation/bin/dspace generate-sitemaps
+
+# https://ubuntuforums.org/showthread.php?t=979694
+# Start process in the background and send its output to file descriptor 3
+exec 3< <(while (true); do
+    make update_oai
+    make update_statistics
+    make update_sitemap
+    make lift_embargos
+    make update_openaire_cache
+    make update_discovery
+    echo "INIT DONE."
+    sleep 86400
+done)
+
+# Read the output of the process line by line until one line contains Ready
+while read line; do
+   case "$line" in
+   "INIT DONE.")
+      break
+      ;;
+   esac
+done <&3
+
+# Close the file descriptor
+exec <&3 3<&-
 /opt/tomcat8/bin/shutdown.sh -force
 
 # start tomcat