0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 11:06:09 +02:00

simplify first character check in entrypoint.sh

"$(echo "$REDIS_HOST" | cut -c1-1)" equals
"${REDIS_HOST:0:1}"
This commit is contained in:
Doncho Gunchev 2022-01-16 01:57:59 +02:00 committed by GitHub
parent 365c4f8400
commit cb05cb72de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
file_env REDIS_HOST_PASSWORD file_env REDIS_HOST_PASSWORD
echo 'session.save_handler = redis' echo 'session.save_handler = redis'
# check if redis host is an unix socket path # 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 if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\""
else else