Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -122,15 +123,15 @@ 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:-<unset>} — effective IONOS links:"
log_info "MARKET=${MARKET:-<unset>} — 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}")"
done
}

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"
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
Loading