From 66ff7baaccb7d0e375b2886a8f036c55f284c75e Mon Sep 17 00:00:00 2001 From: Alex Efros Date: Fri, 14 Jun 2024 11:43:55 +0300 Subject: [PATCH] fix(entrypoint.sh): parse config I'm using domain name with TLD "name" (i.e. `allowed_host1 = etesync.example.name`) and this result in false match and scary log output on container start: ``` 2024-06-14T08:41:56+00:00 [Info] [Entrypoint]: Check permission of allowed_host1 = etesync.example.name /data/db.sqlite3 2024-06-14T08:41:56+00:00 [Info] [Entrypoint]: allowed_host1 = etesync.example.name /data/db.sqlite3 does not exist ``` --- context/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 2a1e469..3f164bf 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -295,7 +295,7 @@ if [ -e "${ETEBASE_EASY_CONFIG_PATH}" ]; then check_perms "$(grep secret_file "${ETEBASE_EASY_CONFIG_PATH}" | sed -e 's/secret_file = //g')" check_perms "$(grep media_root "${ETEBASE_EASY_CONFIG_PATH}" | sed -e 's/media_root = //g')" 'w' if grep sqlite3 "${ETEBASE_EASY_CONFIG_PATH}" >/dev/null; then - check_perms "$(grep name "${ETEBASE_EASY_CONFIG_PATH}" | sed -e 's/name = //g')" 'w' + check_perms "$(grep '^name = ' "${ETEBASE_EASY_CONFIG_PATH}" | sed -e 's/name = //g')" 'w' fi fi