#!/usr/bin/with-contenv bash
# shellcheck shell=bash

NOTIFY_PUSH_URL=$(echo "$(occ config:system:get overwrite.cli.url)/push")
echo "**** Setting notify_push server URL to ${NOTIFY_PUSH_URL} ****"
if ! occ notify_push:setup "${NOTIFY_PUSH_URL}"; then
    echo "**** There was an error setting the notify_push server URL. Please double check your reverse proxy settings as well as the overwrite.cli.url entry in Nextcloud's config.php ****"
fi
