diff options
-rwxr-xr-x | htmpasswd | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -39,20 +39,29 @@ set -o nounset # set -x if the DEBUG-environmental is true if ${DEBUG:-false}; then set -x; fi + +# Variables + # Directory where htpasswd-files are stored HTDIR=/etc/nginx/htpasswd # Spool-directory where temporary users are stored until they can be deleted SPOOLDIR=/var/spool/htmpasswd -# Temporary time, with minute precicion -# Must be valid with `date` -# Check by doing `date --date "$TIME"` +# Temporary time, with minute precicion. Must be valid with `date`. Check by doing `date --date "$TIME"` TIME="+1 day" +# Lengt of username USER_LENGTH=6 + +# Length of password PASS_LENGTH=6 +# Load config, if it exists +if [[ -r /etc/default/htmpasswd ]]; then + . /etc/default/htmpasswd +fi + die() { echo "$@" exit 1 |