From cb05cb72dea793f72062b01ca62c28f8212b48c4 Mon Sep 17 00:00:00 2001 From: Doncho Gunchev Date: Sun, 16 Jan 2022 01:57:59 +0200 Subject: [PATCH] simplify first character check in entrypoint.sh "$(echo "$REDIS_HOST" | cut -c1-1)" equals "${REDIS_HOST:0:1}" --- 23/fpm-alpine/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/23/fpm-alpine/entrypoint.sh b/23/fpm-alpine/entrypoint.sh index b6da893b..206e2878 100755 --- a/23/fpm-alpine/entrypoint.sh +++ b/23/fpm-alpine/entrypoint.sh @@ -57,7 +57,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env REDIS_HOST_PASSWORD echo 'session.save_handler = redis' # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ "${REDIS_HOST:0:1}" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else