Merge pull request #1069 from linuxserver/nextcloud-notify-push-retry

add deps and a retry
This commit is contained in:
aptalca 2025-10-13 16:05:08 -04:00 committed by GitHub
commit 0a022e8ee2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View File

@ -2,7 +2,15 @@
# shellcheck shell=bash
NOTIFY_PUSH_URL=$(echo "$(occ config:system:get overwrite.cli.url)/push")
RETRY=0
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
while ! occ notify_push:setup "${NOTIFY_PUSH_URL}"; do
RETRY=$((${RETRY} + 1))
if [[ "${RETRY}" -lt 6 ]]; then
echo "**** Retrying notify_push setup ****"
sleep 3
else
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 ****"
break
fi
done