mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
Check if password was given
htpasswd requiers `-b` to accept passwords from commandline.
This commit is contained in:
parent
a87d968870
commit
c65d4735ae
1 changed files with 5 additions and 1 deletions
|
@ -7,4 +7,8 @@ if [ -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
htpasswd -s $PASSWORD_FILE $1 $2
|
||||
if [ -z $2 ]; then
|
||||
htpasswd -s $PASSWORD_FILE $1
|
||||
else
|
||||
htpasswd -b -s $PASSWORD_FILE $1 $2
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue