Add basic Flask/Jinja setup and basic YAML config
This commit is contained in:
parent
c2d8d5af22
commit
657ee72ecb
4 changed files with 64 additions and 0 deletions
24
securepass.sh
Executable file
24
securepass.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
## bcrypt passwd generator ##
|
||||
#############################
|
||||
CMD=$(which htpasswd 2>/dev/null)
|
||||
OPTS="-nBC 15"
|
||||
|
||||
read -p "Username: " USERNAME
|
||||
|
||||
check_config() {
|
||||
if [ -z $CMD ]; then
|
||||
printf "Exiting: htpasswd is missing.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$USERNAME" ]; then
|
||||
usage
|
||||
fi
|
||||
}
|
||||
|
||||
check_config $USERNAME
|
||||
printf "Generating Bcrypt hash for username: $USERNAME\n\n"
|
||||
$CMD $OPTS $USERNAME
|
||||
exit $?
|
Reference in a new issue