From 749de829d5bad6a05ebe1a733a6bd942c1a386ec Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Fri, 16 May 2025 11:16:41 +0200 Subject: [mod] container: refactor entrypoint script That entrypoint is prone to screw things up, especially with permission handling. The new script handles initialization better and fixes some issues like delayed settings update via ENVs and timestamp overwriting, also adjusts what should be copied into the container. Related https://github.com/searxng/searxng/pull/4721#issuecomment-2850272129 --- container/entrypoint.sh | 166 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100755 container/entrypoint.sh (limited to 'container/entrypoint.sh') diff --git a/container/entrypoint.sh b/container/entrypoint.sh new file mode 100755 index 000000000..775fc8a2a --- /dev/null +++ b/container/entrypoint.sh @@ -0,0 +1,166 @@ +#!/bin/sh +# shellcheck shell=dash +set -eu + +check_file() { + local target="$1" + + if [ ! -f "$target" ]; then + cat <