mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
Merge pull request #86 from rafacouto/bugfix-issue#85
Fix docker create_user script error when reading password from command line.
This commit is contained in:
commit
947374fbfb
1 changed files with 7 additions and 1 deletions
|
@ -7,4 +7,10 @@ if [ -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
htpasswd -s $PASSWORD_FILE $1 $2
|
||||
if [ -z "$2" ]; then
|
||||
# password from prompt
|
||||
htpasswd -s $PASSWORD_FILE $1
|
||||
else
|
||||
# read password from command line
|
||||
htpasswd -s -b $PASSWORD_FILE $1 $2
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue