From 753ffb7ce251d782e5c69a47445a7463684059d2 Mon Sep 17 00:00:00 2001
From: Jan Boonen <janboonen5@gmail.com>
Date: Thu, 6 Dec 2018 21:40:33 +0100
Subject: Prevent corrupt Alias after restart of container.

When the LOCATION environment variable is set then a restart of a container will lead to a corrupt Alias configuration. The command 'sed -e "s|Alias /|Alias $LOCATION|"' will be executed again and thereby prepend the existing path with the same path.
---
 2.4/docker-entrypoint.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to '2.4/docker-entrypoint.sh')

diff --git a/2.4/docker-entrypoint.sh b/2.4/docker-entrypoint.sh
index 84bf8e1..3ee4575 100755
--- a/2.4/docker-entrypoint.sh
+++ b/2.4/docker-entrypoint.sh
@@ -29,7 +29,7 @@ fi
 
 # Configure dav.conf
 if [ "x$LOCATION" != "x" ]; then
-    sed -e "s|Alias /|Alias $LOCATION|" \
+    sed -e "s|Alias .*|Alias $LOCATION /var/lib/dav/data/|" \
         -i "$HTTPD_PREFIX/conf/conf-available/dav.conf"
 fi
 if [ "x$REALM" != "x" ]; then
-- 
cgit v1.2.3