From e2559957da752cf9c77db68f836f66018b410579 Mon Sep 17 00:00:00 2001 From: Manuel Gutierrez Date: Tue, 4 Feb 2020 12:23:24 +0100 Subject: [PATCH] Use batch mode on htpasswd --- nginx/config/entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nginx/config/entrypoint.sh b/nginx/config/entrypoint.sh index 468c8a92..25ee6b54 100644 --- a/nginx/config/entrypoint.sh +++ b/nginx/config/entrypoint.sh @@ -30,14 +30,14 @@ if [ ! -f /etc/nginx/conf.d/kibana.htpasswd ]; then do IFS=':' read -r -a credentials <<< "${users[index]}" if [ $index -eq 0 ]; then - echo ${credentials[1]}|htpasswd -i -c /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} >/dev/null + htpasswd -b -c /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} ${credentials[1]} >/dev/null else - echo ${credentials[1]}|htpasswd -i /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} >/dev/null + htpasswd -b /etc/nginx/conf.d/kibana.htpasswd ${credentials[0]} ${credentials[1]} >/dev/null fi done else # NGINX_PWD and NGINX_NAME are declared in nginx/Dockerfile - echo $NGINX_PWD|htpasswd -i -c /etc/nginx/conf.d/kibana.htpasswd $NGINX_NAME >/dev/null + htpasswd -b -c /etc/nginx/conf.d/kibana.htpasswd $NGINX_NAME $NGINX_PWD >/dev/null fi else echo "Kibana credentials already configured"