mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
19 lines
399 B
Bash
Executable file
19 lines
399 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ -n "$DISABLE_AUTHENTICATION" ]; then
|
|
OPTIONS="--no-auth $OPTIONS"
|
|
else
|
|
if [ ! -f "$PASSWORD_FILE" ]; then
|
|
touch "$PASSWORD_FILE"
|
|
fi
|
|
|
|
if [ ! -s "$PASSWORD_FILE" ]; then
|
|
echo
|
|
echo "**WARNING** No user exists, please 'docker exec -it \$CONTAINER_ID create_user'"
|
|
echo
|
|
fi
|
|
fi
|
|
|
|
exec rest-server --path "$DATA_DIRECTORY" $OPTIONS
|