| 1234567891011121314151617 | #!/bin/bash -e[ $# -eq 0 ] && { echo "Usage: $0 <vhost> <user> <pass>"; exit 1; }vhost=$1user=$2pass=$3htpasswd_dir=/opt/docker/reverse-proxy/data/htpasswd/mkdir -p $htpasswd_dir htpasswd="$user"":"`echo $pass | openssl passwd -stdin`echo "  Writing:"echo "    --> $htpasswd"echo "    --> into: $htpasswd_dir$vhost"echo $htpasswd > $htpasswd_dir$vhost# Restart so the password file is read by nginxdocker restart reverse-proxy
 |