diff options
author | Jamie Nguyen <j@jamielinux.com> | 2018-07-18 08:45:16 +0100 |
---|---|---|
committer | Jamie Nguyen <j@jamielinux.com> | 2018-07-18 08:45:16 +0100 |
commit | 9fceea420309c2334241ed3a60fd9f47e7428217 (patch) | |
tree | 7291f4784506a8d2b72099804d3c643f0ae2ccfe | |
parent | b37340668e00aa34fd2255dc7fa78735154abac9 (diff) | |
download | apache-9fceea420309c2334241ed3a60fd9f47e7428217.tar.gz apache-9fceea420309c2334241ed3a60fd9f47e7428217.tar.bz2 apache-9fceea420309c2334241ed3a60fd9f47e7428217.tar.xz apache-9fceea420309c2334241ed3a60fd9f47e7428217.zip |
Only mkdir and touch if needed
-rwxr-xr-x | 2.4/docker-entrypoint.sh | 4 |
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 "$@" |