From c29024e8c5f2b9849fec3281328fbe0b772474af Mon Sep 17 00:00:00 2001 From: Yevhen Kolomeiko Date: Tue, 5 Dec 2023 11:35:34 +0100 Subject: [PATCH 1/4] Fix docker-entrypoint.sh Signed-off-by: Yevhen Kolomeiko --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index edb539a01..d272ae68f 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -type f,l -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue From ab7267ff94b97360861cf5877deacbf1400790e4 Mon Sep 17 00:00:00 2001 From: Yevhen Kolomeiko Date: Tue, 12 Dec 2023 23:32:22 +0100 Subject: [PATCH 2/4] Fix docker-entrypoint.sh for alpine Signed-off-by: Yevhen Kolomeiko --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d272ae68f..2e11ac015 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f,l -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + ( find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print; find "${hook_folder_path}" -type l -maxdepth 1 -iname '*.sh' -print ) | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue From 179788a71a1b3009f7f97209fbe4ae29c9a5b098 Mon Sep 17 00:00:00 2001 From: Yevhen Kolomeiko Date: Thu, 21 Dec 2023 02:07:52 +0100 Subject: [PATCH 3/4] Use '-o' instead of two find's in docker-entrypoint.sh Signed-off-by: Yevhen Kolomeiko --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 2e11ac015..b086ebf06 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - ( find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print; find "${hook_folder_path}" -type l -maxdepth 1 -iname '*.sh' -print ) | sort | while read -r script_file_path; do + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print -o -type l -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue From b85370011f1a8861cef042a1e540eb22dd08d641 Mon Sep 17 00:00:00 2001 From: Yevhen Kolomeiko Date: Fri, 22 Dec 2023 03:01:39 +0100 Subject: [PATCH 4/4] Use more laconic find parameters set in docker-entrypoint.sh Signed-off-by: Yevhen Kolomeiko --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b086ebf06..5b627f076 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print -o -type l -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue