diff --git a/configure.sh b/configure.sh index 46f353c..7ee2f6c 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 @@ -122,7 +123,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 +131,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,19 +181,28 @@ 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..." + + 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 - 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 - 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 _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 } @@ -234,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 @@ -258,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