From 3d357f56fbbc6492596c0db9ce97c35e6f44ea79 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Thu, 24 Oct 2024 12:26:13 -0700 Subject: [PATCH] fix(docker-entrypoint): search new directory for socket cleanup This adapts the fix from d3411e0 to additionally search $PREFIX/sockets for leftover unix sockets. See also: https://github.com/Kong/kong/pull/13409 --- docker-entrypoint.sh | 2 +- ubuntu/docker-entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 4aa71ded..bd8f0240 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -46,7 +46,7 @@ if [[ "$1" == "kong" ]]; then # remove all dangling sockets in $PREFIX dir before starting Kong LOGGED_SOCKET_WARNING=0 - for localfile in "$PREFIX"/*; do + for localfile in "$PREFIX"/* "$PREFIX"/sockets/*; do if [ -S "$localfile" ]; then if (( LOGGED_SOCKET_WARNING == 0 )); then printf >&2 'WARN: found dangling unix sockets in the prefix directory ' diff --git a/ubuntu/docker-entrypoint.sh b/ubuntu/docker-entrypoint.sh index 4aa71ded..bd8f0240 100755 --- a/ubuntu/docker-entrypoint.sh +++ b/ubuntu/docker-entrypoint.sh @@ -46,7 +46,7 @@ if [[ "$1" == "kong" ]]; then # remove all dangling sockets in $PREFIX dir before starting Kong LOGGED_SOCKET_WARNING=0 - for localfile in "$PREFIX"/*; do + for localfile in "$PREFIX"/* "$PREFIX"/sockets/*; do if [ -S "$localfile" ]; then if (( LOGGED_SOCKET_WARNING == 0 )); then printf >&2 'WARN: found dangling unix sockets in the prefix directory '