rest-server/docker/create_user
Michael Eischer 20edfb87ee docker: use bcrypt in create_users script
This was missed when adding bcrypt support in rest-server 0.9.7
2021-08-20 22:52:03 +02:00

16 lines
308 B
Bash
Executable file

#!/bin/sh
if [ -z "$1" ]; then
echo "create_user [username]"
echo "or"
echo "create_user [username] [password]"
exit 1
fi
if [ -z "$2" ]; then
# password from prompt
htpasswd -B $PASSWORD_FILE $1
else
# read password from command line
htpasswd -B -b $PASSWORD_FILE $1 $2
fi