#!/usr/bin/env bash
HTADMIN_ENABLED=${NGINX_BASIC_AUTH:-"true"}
if [[ "$HTADMIN_ENABLED" == "true" ]]; then
  sleep 10
  nginx -g "daemon off;"
else
  mkdir -p /tmp/htadmin_disabled
    pushd /tmp/htadmin_disabled >/dev/null 2>&1 && \
    cat << EOF > index.html
      
      
Refer to the Malcolm documentation for details on LDAP authentication.
EOF python -m SimpleHTTPServer 80 popd >/dev/null 2>&1 fi