From b1134946ca8bbaceca20f6af1a2f150f17437bba Mon Sep 17 00:00:00 2001 From: clickkiddie Date: Sun, 13 Oct 2019 11:04:43 +0000 Subject: [PATCH] added overwrite.cli.url Signed-off-by: clickkiddie Signed-off-by: clickkiddie <44850680+clickkiddie@users.noreply.github.com> --- 15.0/apache/entrypoint.sh | 4 ++++ 15.0/fpm-alpine/entrypoint.sh | 4 ++++ 15.0/fpm/entrypoint.sh | 4 ++++ 16.0/apache/entrypoint.sh | 4 ++++ 16.0/fpm-alpine/entrypoint.sh | 4 ++++ 16.0/fpm/entrypoint.sh | 4 ++++ 17.0/apache/entrypoint.sh | 4 ++++ 17.0/fpm-alpine/entrypoint.sh | 4 ++++ 17.0/fpm/entrypoint.sh | 4 ++++ README.md | 1 + docker-entrypoint.sh | 4 ++++ 11 files changed, 41 insertions(+) diff --git a/15.0/apache/entrypoint.sh b/15.0/apache/entrypoint.sh index 878369c2..35d6887e 100755 --- a/15.0/apache/entrypoint.sh +++ b/15.0/apache/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/15.0/fpm-alpine/entrypoint.sh b/15.0/fpm-alpine/entrypoint.sh index 878369c2..35d6887e 100755 --- a/15.0/fpm-alpine/entrypoint.sh +++ b/15.0/fpm-alpine/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/15.0/fpm/entrypoint.sh b/15.0/fpm/entrypoint.sh index 878369c2..35d6887e 100755 --- a/15.0/fpm/entrypoint.sh +++ b/15.0/fpm/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/16.0/apache/entrypoint.sh b/16.0/apache/entrypoint.sh index 878369c2..35d6887e 100755 --- a/16.0/apache/entrypoint.sh +++ b/16.0/apache/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/16.0/fpm-alpine/entrypoint.sh b/16.0/fpm-alpine/entrypoint.sh index 878369c2..35d6887e 100755 --- a/16.0/fpm-alpine/entrypoint.sh +++ b/16.0/fpm-alpine/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/16.0/fpm/entrypoint.sh b/16.0/fpm/entrypoint.sh index 878369c2..35d6887e 100755 --- a/16.0/fpm/entrypoint.sh +++ b/16.0/fpm/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/17.0/apache/entrypoint.sh b/17.0/apache/entrypoint.sh index 878369c2..35d6887e 100755 --- a/17.0/apache/entrypoint.sh +++ b/17.0/apache/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/17.0/fpm-alpine/entrypoint.sh b/17.0/fpm-alpine/entrypoint.sh index 878369c2..35d6887e 100755 --- a/17.0/fpm-alpine/entrypoint.sh +++ b/17.0/fpm-alpine/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/17.0/fpm/entrypoint.sh b/17.0/fpm/entrypoint.sh index 878369c2..35d6887e 100755 --- a/17.0/fpm/entrypoint.sh +++ b/17.0/fpm/entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@" diff --git a/README.md b/README.md index 94503b56..132aa78e 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ Reverse proxy configuration according to [Admin Manual](https://docs.nextcloud.c - `NEXTCLOUD_OVERWRITEPROTOCOL` (not set by default) Optional overwriteprotocol (e.g. https) - `NEXTCLOUD_OVERWRITEHOST` (not set by default) Optional overwritehost (e.g. nextcloud.examle.com) - `NEXTCLOUD_OVERWRITEWEBROOT` (not set by default) Optional overwritewebroot (e.g. /cloud) +- `NEXTCLOUD_OVERWRITE_CLI_URL` (not set by default) Optional overwrite.cli.url (e.g. https://example.com/cloud) The install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 878369c2..35d6887e 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -164,5 +164,9 @@ if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then echo "setting overwritewebroot…" run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" fi +if [ -n "${NEXTCLOUD_OVERWRITE_CLI_URL+x}" ]; then + echo "setting overwrite.cli.url" + run_as "php /var/www/html/occ config:system:set overwrite.cli.url --value=$NEXTCLOUD_OVERWRITE_CLI_URL" +fi exec "$@"