From f1935319ab5eb9abccef81a49a18658a23321a0e Mon Sep 17 00:00:00 2001 From: Reto Bollinger Date: Thu, 28 Nov 2024 13:10:23 +0100 Subject: [PATCH] Using mktemp --- lektor/docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lektor/docker/entrypoint.sh b/lektor/docker/entrypoint.sh index f7e94d2..e4c6fcb 100644 --- a/lektor/docker/entrypoint.sh +++ b/lektor/docker/entrypoint.sh @@ -2,7 +2,7 @@ sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher.py ${CALENDAR_URL} > /opt/lektor/project/content/termine/contents.lr" # TODO As the file reads from the same file as it's output is afterwards piped into this leads to synchronization/buffering issues, we therefore write to a temporaray file and move it to the right place in a subsequent step -tempfile="/tmp/contents.lr" +tempfile=$(mktemp) sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher-main.py ${CALENDAR_URL} > $tempfile" mv $tempfile /opt/lektor/project/content/contents.lr /root/.local/bin/lektor --project /opt/lektor/project server --host 0.0.0.0 \ No newline at end of file