Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/docker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilo Spannagel <development@tilosp.de>2019-04-30 13:49:11 +0300
committerTilo Spannagel <development@tilosp.de>2019-04-30 14:06:03 +0300
commitf0fd46a989020bd7d213cf57b15b4d461cb6376b (patch)
tree5caaf6997b768b40a5a90649930b303e23e61d0e /docker-entrypoint.sh
parent0578591681e6020a8cd16d39d3128f187627d6c8 (diff)
Revert "Compatibility with docker secrets (Fix #560)"
[skip travis] Signed-off-by: Tilo Spannagel <development@tilosp.de>
Diffstat (limited to 'docker-entrypoint.sh')
-rwxr-xr-xdocker-entrypoint.sh30
1 files changed, 0 insertions, 30 deletions
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index a45147f..78bd0a8 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -19,31 +19,6 @@ run_as() {
fi
}
-# usage: file_env VAR [DEFAULT]
-# ie: file_env 'XYZ_DB_PASSWORD' 'example'
-# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
-# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
-file_env() {
- local var="$1"
- local fileVar="${var}_FILE"
- local def="${2:-}"
- if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
- echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
- exit 1
- fi
- local val="$def"
- if [ "${!var:-}" ]; then
- val="${!var}"
- elif [ "${!fileVar:-}" ]; then
- val="$(< "${!fileVar}")"
- else
- # do not define empty vars
- return
- fi
- export "$var"="$val"
- unset "$fileVar"
-}
-
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
@@ -92,8 +67,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New nextcloud instance"
- file_env NEXTCLOUD_ADMIN_PASSWORD
-
if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then
# shellcheck disable=SC2016
install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
@@ -108,9 +81,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"'
fi
- file_env MYSQL_PASSWORD
- file_env POSTGRES_PASSWORD
-
install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database"