summaryrefslogtreecommitdiffstats
path: root/docker-entrypoint.sh
diff options
context:
space:
mode:
authoralgakzru <algakzru@gmail.com>2019-09-10 08:31:16 +0800
committerJ0WI <J0WI@users.noreply.github.com>2019-09-10 02:31:16 +0200
commit73ff5c860d155d46ed65b6ae9caa9ee6e64478de (patch)
treef2ffb27acfb5e070c93a05f6428fa9485fdb7f92 /docker-entrypoint.sh
parent892ac14791fc3ebbb201f23584ca34f83e33e8a1 (diff)
Diffstat (limited to 'docker-entrypoint.sh')
-rwxr-xr-xdocker-entrypoint.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 0be9d287..9514d881 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -25,7 +25,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
- echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi