From 6a63e9cd88c2e50c20fd4df830604f49a55f119a Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Wed, 19 Oct 2022 22:44:42 +0200 Subject: [PATCH] don't update crontab file if ENV missing --- docker/entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index cc337f0..b123623 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,5 +1,7 @@ #!/bin/sh -echo "${CRONTAB}" > /crontabs/root +if [ ! -z "${CRONTAB}" ] ; then + echo "${CRONTAB}" > /crontabs/roota +fi /usr/sbin/crond -f -d8 -L /var/log/cron.log -c /crontabs