From f1daad5db82bb147fa1bedb07a83afe0df0a9303 Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Mon, 3 Aug 2026 11:08:17 +0200 Subject: [PATCH 1/4] refactor(configure.sh): use log_warning instead of inline ANSI codes The notify_push base URL warning was the last hand-rolled "\033[1;33m..." echo in the script. Use the log_warning helper so warnings are formatted consistently and go to stderr. --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index 46f353c..699fc01 100755 --- a/configure.sh +++ b/configure.sh @@ -187,7 +187,7 @@ configure_app_notify_push() { _base_url=$(execute_occ_command config:system:get overwrite.cli.url) if [ -z "${_base_url}" ]; then - echo "\033[1;33mWarning: Base URL (overwrite.cli.url) is not set. notify_push base_endpoint cannot be configured.\033[0m" + log_warning "Base URL (overwrite.cli.url) is not set. notify_push base_endpoint cannot be configured." return 0 fi From 39a31bcd6769a73dde92d579bb86d75dc08fbb33 Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Mon, 3 Aug 2026 11:09:13 +0200 Subject: [PATCH 2/4] refactor(configure.sh): use log_info for plain status output Route the remaining status echoes through the log_info helper so all progress output carries the same "[i] " prefix. The indented key = value lines of the market block and the single-line progress printf in disable_configured_apps are left untouched, since a per-line prefix would break their formatting. --- configure.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.sh b/configure.sh index 699fc01..7bdcf47 100755 --- a/configure.sh +++ b/configure.sh @@ -122,7 +122,7 @@ log_market_config() { # IONOS links are applied declaratively via the config partials. Read them back # here (config:system:get only) so the resulting MARKET and URLs show up in the # pod log for troubleshooting. - echo "MARKET=${MARKET:-} — effective IONOS links:" + log_info "MARKET=${MARKET:-} — effective IONOS links:" echo " ionos_webmail_target_link = $(execute_occ_command config:system:get ionos_peer_products ionos_webmail_target_link)" for _key in ionos_help_target_link ionos_customclient_android ionos_customclient_ios ionos_homepage; do echo " ${_key} = $(execute_occ_command config:system:get "${_key}")" @@ -130,7 +130,7 @@ log_market_config() { } config_ui() { - echo "Configure theming" + log_info "Configure theming" execute_occ_command theming:config name "HiDrive Next" execute_occ_command theming:config slogan "powered by IONOS" @@ -180,10 +180,10 @@ configure_serverinfo_app() { # Configure notify_push app # Usage: configure_notify_push_app configure_app_notify_push() { - echo "Configuring notify_push app..." + log_info "Configuring notify_push app..." execute_occ_command app:enable notify_push - echo "Retrieving base URL for notify_push endpoint..." + log_info "Retrieving base URL for notify_push endpoint..." _base_url=$(execute_occ_command config:system:get overwrite.cli.url) if [ -z "${_base_url}" ]; then @@ -192,7 +192,7 @@ configure_app_notify_push() { fi _notify_push_endpoint="${_base_url}/push" - echo "Setting notify_push base_endpoint: ${_notify_push_endpoint}" + log_info "Setting notify_push base_endpoint: ${_notify_push_endpoint}" execute_occ_command config:app:set --value "${_notify_push_endpoint}" --type string -- notify_push base_endpoint } From e862a4347f19afb9184ed5cb97a21da5a49c43cf Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Mon, 3 Aug 2026 11:10:11 +0200 Subject: [PATCH 3/4] fix(configure.sh): disable notify_push unless Redis password is set notify_push without a reachable Redis throws while its console commands are constructed, and that error lands on stdout with exit code 0 (see nextcloud/server#62718). It then corrupts every occ call whose output the script captures, most notably the `occ app:list --enabled --output json` piped into jq in disable_configured_apps. Disable notify_push up front and only enable it when REDIS_HOST_PASSWORD is set, i.e. when the app can actually work. --- configure.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.sh b/configure.sh index 7bdcf47..f84349a 100755 --- a/configure.sh +++ b/configure.sh @@ -22,6 +22,7 @@ # - IONOS_PROCESSES_USER: Username for IONOS processes API # - IONOS_PROCESSES_PASS: Password for IONOS processes API # - NC_APP_SERVERINFO_TOKEN: Token for serverinfo app +# - REDIS_HOST_PASSWORD: Redis password; notify_push stays disabled when unset # - COLLABORA_HOST: Collabora server host URL # - COLLABORA_EDIT_GROUPS: Groups allowed to edit in Collabora # - COLLABORA_SELF_SIGNED: Set to "true" for self-signed certificates @@ -181,6 +182,15 @@ configure_serverinfo_app() { # Usage: configure_notify_push_app configure_app_notify_push() { log_info "Configuring notify_push app..." + + disable_single_app notify_push + + # Check required environment variables + if [ -z "${REDIS_HOST_PASSWORD}" ]; then + log_warning "REDIS_HOST_PASSWORD not set, skipping configuration of notify_push app" + return 0 + fi + execute_occ_command app:enable notify_push log_info "Retrieving base URL for notify_push endpoint..." From bafc4215654e83bbd15fe63586131c9d681717b9 Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Mon, 3 Aug 2026 11:10:57 +0200 Subject: [PATCH 4/4] fix(configure.sh): configure notify_push before the other apps Settle the notify_push state before any other occ invocation, so a broken notify_push bootstrap cannot corrupt the captured stdout of the config reads that follow (config:system:get in config_ui and log_market_config, app:list in disable_configured_apps). --- configure.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index f84349a..7ee2f6c 100755 --- a/configure.sh +++ b/configure.sh @@ -244,6 +244,8 @@ configure_app_richdocuments() { config_apps() { log_info "Configure apps ..." + configure_app_notify_push + log_info "Configure viewer app" execute_occ_command config:app:set --value yes --type string viewer always_show_viewer @@ -268,7 +270,6 @@ config_apps() { configure_ionos_processes_app configure_serverinfo_app configure_app_richdocuments - configure_app_notify_push log_info "Configure files app" execute_occ_command config:app:set --value yes files crop_image_previews