summaryrefslogtreecommitdiffstats
path: root/2.4
diff options
context:
space:
mode:
authorJamie Nguyen <j@jamielinux.com>2018-07-18 08:45:16 +0100
committerJamie Nguyen <j@jamielinux.com>2018-07-18 08:45:16 +0100
commit9fceea420309c2334241ed3a60fd9f47e7428217 (patch)
tree7291f4784506a8d2b72099804d3c643f0ae2ccfe /2.4
parentb37340668e00aa34fd2255dc7fa78735154abac9 (diff)
downloadapache-9fceea420309c2334241ed3a60fd9f47e7428217.tar.gz
apache-9fceea420309c2334241ed3a60fd9f47e7428217.tar.bz2
apache-9fceea420309c2334241ed3a60fd9f47e7428217.tar.xz
apache-9fceea420309c2334241ed3a60fd9f47e7428217.zip
Only mkdir and touch if needed
Diffstat (limited to '2.4')
-rwxr-xr-x2.4/docker-entrypoint.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/2.4/docker-entrypoint.sh b/2.4/docker-entrypoint.sh
index 5840b23..84bf8e1 100755
--- a/2.4/docker-entrypoint.sh
+++ b/2.4/docker-entrypoint.sh
@@ -99,8 +99,8 @@ if [ -e /privkey.pem ] && [ -e /cert.pem ]; then
fi
# Create directories for Dav data and lock database.
-mkdir -p "/var/lib/dav/data"
-touch "/var/lib/dav/DavLock"
+[ ! -d "/var/lib/dav/data" ] && mkdir -p "/var/lib/dav/data"
+[ ! -e "/var/lib/dav/DavLock" ] && touch "/var/lib/dav/DavLock"
chown -R www-data:www-data "/var/lib/dav"
exec "$@"