mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
missing htpasswd-flag "-b" when using password from cli
This commit is contained in:
parent
a87d968870
commit
2996d50b40
1 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
HTPASSWD="htpasswd"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "create_user [username]"
|
||||
echo "or"
|
||||
|
@ -7,4 +9,10 @@ if [ -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
htpasswd -s $PASSWORD_FILE $1 $2
|
||||
if [ ! -z "$2" ]; then
|
||||
HTPASSWD="$HTPASSWD -b"
|
||||
fi
|
||||
|
||||
HTPASSWD="$HTPASSWD -s $PASSWORD_FILE $1 $2"
|
||||
|
||||
$HTPASSWD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue