diff options
author | Dennis Eriksen <d@ennis.no> | 2021-03-31 14:32:18 +0200 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2021-03-31 14:32:18 +0200 |
commit | df9c02be6852f44183a6364859bc4f30497860df (patch) | |
tree | c19786fd9bc84986bf174bf5ff3aff72cfb6d980 | |
parent | removing a not very tasteful debugline (diff) | |
download | htmpasswd-df9c02be6852f44183a6364859bc4f30497860df.tar.gz |
add configfile
Diffstat (limited to '')
-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 |