From 63f6f969ccc95b561cf0c6749fc39c9684ceab8e Mon Sep 17 00:00:00 2001 From: Vassiliy Yegorov Date: Sun, 31 Aug 2025 20:34:12 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82=20entrypoint.sh:?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B0=20=D0=B4=D0=BE=D1=81=D1=82=D1=83?= =?UTF-8?q?=D0=BF=D0=B0=20=D0=B4=D0=BB=D1=8F=20crontab,=20=D1=83=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D1=88=D0=B5=D0=BD=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA?= =?UTF-8?q?=D0=B5=20crond=20=D1=81=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BE?= =?UTF-8?q?=D1=87=D0=BD=D0=BE=D0=B9=20=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B5=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/entrypoint.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 18776c1..fec4353 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -1,8 +1,17 @@ #!/bin/sh -# Create crontab in a writable location +# Create crontab in a writable location and set proper permissions mkdir -p /tmp/crontabs -echo "${CRONTAB} /scripts/backup.sh" > /tmp/crontabs/root +echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh" > /tmp/crontabs/root +chmod 644 /tmp/crontabs/root +# Run initial backup /scripts/backup.sh -exec crond -f -c /tmp/crontabs + +# Start crond with debug output +echo "Starting crond with config:" +cat /tmp/crontabs/root +echo "---" + +# Start crond in foreground with debug output +exec crond -f -c /tmp/crontabs -d 8