diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-08-14 03:10:02 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-08-14 03:10:02 +0200 |
commit | cd57cd5e3fe6916c18908c5ddd4c72745c0b7870 (patch) | |
tree | 010ad2d2679d36438e0f6fc02e1f961931e45dce /2.4/docker-entrypoint.sh | |
parent | ceb146ff4df7325d6bce4a5e3b3dd6003f96577c (diff) | |
download | apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.tar.gz apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.tar.bz2 apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.tar.xz apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.zip |
Move user.passwd to /tmp
Diffstat (limited to '2.4/docker-entrypoint.sh')
-rwxr-xr-x | 2.4/docker-entrypoint.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/2.4/docker-entrypoint.sh b/2.4/docker-entrypoint.sh index 3ee4575..3f21549 100755 --- a/2.4/docker-entrypoint.sh +++ b/2.4/docker-entrypoint.sh @@ -49,16 +49,16 @@ if [ "x$AUTH_TYPE" != "x" ]; then fi # Add password hash, unless "user.passwd" already exists (ie, bind mounted). -if [ ! -e "/user.passwd" ]; then - touch "/user.passwd" +if [ ! -e "/tmp/user.passwd" ]; then + touch "/tmp/user.passwd" # Only generate a password hash if both username and password given. if [ "x$USERNAME" != "x" ] && [ "x$PASSWORD" != "x" ]; then if [ "$AUTH_TYPE" = "Digest" ]; then # Can't run `htdigest` non-interactively, so use other tools. HASH="`printf '%s' "$USERNAME:$REALM:$PASSWORD" | md5sum | awk '{print $1}'`" - printf '%s\n' "$USERNAME:$REALM:$HASH" > /user.passwd + printf '%s\n' "$USERNAME:$REALM:$HASH" > /tmp/user.passwd else - htpasswd -B -b -c "/user.passwd" $USERNAME $PASSWORD + htpasswd -B -b -c "/tmp/user.passwd" $USERNAME $PASSWORD fi fi fi |