diff --git a/21/apache/entrypoint.sh b/21/apache/entrypoint.sh index 206e2878..b6da893b 100755 --- a/21/apache/entrypoint.sh +++ b/21/apache/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/21/fpm-alpine/entrypoint.sh b/21/fpm-alpine/entrypoint.sh index 206e2878..b6da893b 100755 --- a/21/fpm-alpine/entrypoint.sh +++ b/21/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/21/fpm/entrypoint.sh b/21/fpm/entrypoint.sh index 206e2878..b6da893b 100755 --- a/21/fpm/entrypoint.sh +++ b/21/fpm/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/22/apache/entrypoint.sh b/22/apache/entrypoint.sh index 206e2878..b6da893b 100755 --- a/22/apache/entrypoint.sh +++ b/22/apache/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/22/fpm-alpine/entrypoint.sh b/22/fpm-alpine/entrypoint.sh index 206e2878..b6da893b 100755 --- a/22/fpm-alpine/entrypoint.sh +++ b/22/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/22/fpm/entrypoint.sh b/22/fpm/entrypoint.sh index 206e2878..b6da893b 100755 --- a/22/fpm/entrypoint.sh +++ b/22/fpm/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/23/apache/entrypoint.sh b/23/apache/entrypoint.sh index 206e2878..b6da893b 100755 --- a/23/apache/entrypoint.sh +++ b/23/apache/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/23/fpm-alpine/entrypoint.sh b/23/fpm-alpine/entrypoint.sh index 206e2878..b6da893b 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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/23/fpm/entrypoint.sh b/23/fpm/entrypoint.sh index 206e2878..b6da893b 100755 --- a/23/fpm/entrypoint.sh +++ b/23/fpm/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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 206e2878..b6da893b 100755 --- a/docker-entrypoint.sh +++ b/docker-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 [ "${REDIS_HOST:0:1}" = "/" ]; then + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" else