mirror of
https://github.com/restic/rest-server.git
synced 2025-12-06 17:15:45 -08:00
- use exec in entrypoint.sh, get rid of extra shell process - use CMD instead of ENTRYPOINT, so image can be run with /bin/sh arg
20 lines
408 B
Bash
Executable File
20 lines
408 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ -z "$DISABLE_AUTHENTICATION" ]; then
|
|
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
|
|
else
|
|
rm -f "$PASSWORD_FILE"
|
|
fi
|
|
|
|
exec rest-server --listen ":80" $OPTIONS --path "$DATA_DIRECTORY"
|