From 933e3c5604ff01fe6a2a4d3a23b92effe5e152b0 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 6 Jan 2022 13:17:27 +0100 Subject: [PATCH] Fix update behavior --- 2021.12-dev/apache/entrypoint-dev.sh | 2 +- 2021.12-dev/fpm-alpine/entrypoint-dev.sh | 2 +- 2021.12-dev/fpm/entrypoint-dev.sh | 2 +- 2021.12-rc/apache/entrypoint-dev.sh | 2 +- 2021.12-rc/fpm-alpine/entrypoint-dev.sh | 2 +- 2021.12-rc/fpm/entrypoint-dev.sh | 2 +- README.md | 3 ++- docker-entrypoint-dev.sh | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/2021.12-dev/apache/entrypoint-dev.sh b/2021.12-dev/apache/entrypoint-dev.sh index 2f2bd3e..8b34c21 100755 --- a/2021.12-dev/apache/entrypoint-dev.sh +++ b/2021.12-dev/apache/entrypoint-dev.sh @@ -2,7 +2,7 @@ set -eu # just check if we execute apache or php-fpm -if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_DISABLE_UPGRADE:-false}" = "false" ]; then +if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then curl -fsSL -o "/usr/src/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" curl -fsSL -o "/usr/src/friendica-addons-${FRIENDICA_ADDONS}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_ADDONS}.tar.gz.sum256" diff --git a/2021.12-dev/fpm-alpine/entrypoint-dev.sh b/2021.12-dev/fpm-alpine/entrypoint-dev.sh index 2f2bd3e..8b34c21 100755 --- a/2021.12-dev/fpm-alpine/entrypoint-dev.sh +++ b/2021.12-dev/fpm-alpine/entrypoint-dev.sh @@ -2,7 +2,7 @@ set -eu # just check if we execute apache or php-fpm -if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_DISABLE_UPGRADE:-false}" = "false" ]; then +if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then curl -fsSL -o "/usr/src/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" curl -fsSL -o "/usr/src/friendica-addons-${FRIENDICA_ADDONS}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_ADDONS}.tar.gz.sum256" diff --git a/2021.12-dev/fpm/entrypoint-dev.sh b/2021.12-dev/fpm/entrypoint-dev.sh index 2f2bd3e..8b34c21 100755 --- a/2021.12-dev/fpm/entrypoint-dev.sh +++ b/2021.12-dev/fpm/entrypoint-dev.sh @@ -2,7 +2,7 @@ set -eu # just check if we execute apache or php-fpm -if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_DISABLE_UPGRADE:-false}" = "false" ]; then +if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then curl -fsSL -o "/usr/src/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" curl -fsSL -o "/usr/src/friendica-addons-${FRIENDICA_ADDONS}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_ADDONS}.tar.gz.sum256" diff --git a/2021.12-rc/apache/entrypoint-dev.sh b/2021.12-rc/apache/entrypoint-dev.sh index 2f2bd3e..8b34c21 100755 --- a/2021.12-rc/apache/entrypoint-dev.sh +++ b/2021.12-rc/apache/entrypoint-dev.sh @@ -2,7 +2,7 @@ set -eu # just check if we execute apache or php-fpm -if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_DISABLE_UPGRADE:-false}" = "false" ]; then +if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then curl -fsSL -o "/usr/src/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" curl -fsSL -o "/usr/src/friendica-addons-${FRIENDICA_ADDONS}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_ADDONS}.tar.gz.sum256" diff --git a/2021.12-rc/fpm-alpine/entrypoint-dev.sh b/2021.12-rc/fpm-alpine/entrypoint-dev.sh index 2f2bd3e..8b34c21 100755 --- a/2021.12-rc/fpm-alpine/entrypoint-dev.sh +++ b/2021.12-rc/fpm-alpine/entrypoint-dev.sh @@ -2,7 +2,7 @@ set -eu # just check if we execute apache or php-fpm -if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_DISABLE_UPGRADE:-false}" = "false" ]; then +if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then curl -fsSL -o "/usr/src/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" curl -fsSL -o "/usr/src/friendica-addons-${FRIENDICA_ADDONS}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_ADDONS}.tar.gz.sum256" diff --git a/2021.12-rc/fpm/entrypoint-dev.sh b/2021.12-rc/fpm/entrypoint-dev.sh index 2f2bd3e..8b34c21 100755 --- a/2021.12-rc/fpm/entrypoint-dev.sh +++ b/2021.12-rc/fpm/entrypoint-dev.sh @@ -2,7 +2,7 @@ set -eu # just check if we execute apache or php-fpm -if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_DISABLE_UPGRADE:-false}" = "false" ]; then +if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then curl -fsSL -o "/usr/src/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" curl -fsSL -o "/usr/src/friendica-addons-${FRIENDICA_ADDONS}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_ADDONS}.tar.gz.sum256" diff --git a/README.md b/README.md index a6f75d1..50e6919 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ There are two options to enable background tasks for Friendica: - `FRIENDICA_NO_VALIDATION` If set to `true`, the URL and E-Mail validation will be disabled. - `FRIENDICA_DATA` Set the name of the storage provider (e.g `Filesystem` to use filesystem), default is the DB backend. - `FRIENDICA_DATA_DIR` The data directory of the Friendica server (Default: /var/www/data). +- `FRIENDICA_UPDATE` Force starting the Friendica update even it's the same version (Default: `false`). **Friendica Logging** @@ -370,7 +371,7 @@ Then run `docker-compose up -d`, now you can access Friendica at http://localhos # Special settings for DEV/RC images The `*-dev` and `*-rc` branches are directly downloaded and verified at each docker start to ensure that the latest sources are used. -It's possible to disable this behaviour by setting the environment variable `FRIENDICA_DISABLE_UPGRADE` to `true`. +The parameter `FRIENDICA_UPGRADE` is required to be `true` (Default: `false`) to activate this behavior. # Questions / Issues diff --git a/docker-entrypoint-dev.sh b/docker-entrypoint-dev.sh index 2f2bd3e..8b34c21 100755 --- a/docker-entrypoint-dev.sh +++ b/docker-entrypoint-dev.sh @@ -2,7 +2,7 @@ set -eu # just check if we execute apache or php-fpm -if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_DISABLE_UPGRADE:-false}" = "false" ]; then +if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then curl -fsSL -o "/usr/src/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_VERSION}.tar.gz.sum256" curl -fsSL -o "/usr/src/friendica-addons-${FRIENDICA_ADDONS}.tar.gz.sum256" "https://files.friendi.ca/friendica-full-${FRIENDICA_ADDONS}.tar.gz.sum256"