mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-15 07:48:14 +01:00
- Added notify_v2.sh wrapper for advanced notification management - Updated Discord and Gotify notification templates for v2 compatibility - Added snooze functionality to prevent duplicate notifications - Added support for multiple notification channels and formats (JSON, CSV, text) - Implemented robust dependency management system with package manager and static binary fallback - Added helper functions: releasenotes(), list_options(), progress_bar() - Improved datecheck() function with proper error handling - Added distro_checker() and binary_downloader() functions - Replaced old dependency checks with modern dependency_check() system
30 lines
809 B
Bash
30 lines
809 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Gotify notification template for podcheck v2
|
|
# Requires: GOTIFY_DOMAIN, GOTIFY_TOKEN
|
|
|
|
if [[ -z "${GOTIFY_DOMAIN:-}" ]] || [[ -z "${GOTIFY_TOKEN:-}" ]]; then
|
|
echo "Error: GOTIFY_DOMAIN and GOTIFY_TOKEN must be configured"
|
|
return 1
|
|
fi
|
|
|
|
# Prepare the Gotify message
|
|
if [[ -n "${NOTIFICATION_MESSAGE:-}" ]]; then
|
|
# Build Gotify URL
|
|
gotify_url="${GOTIFY_DOMAIN}/message?token=${GOTIFY_TOKEN}"
|
|
|
|
# Send to Gotify
|
|
if curl -F "title=${NOTIFICATION_TITLE:-Podcheck Notification}" \
|
|
-F "message=${NOTIFICATION_MESSAGE}" \
|
|
-F "priority=5" \
|
|
-X POST "${gotify_url}" \
|
|
${CurlArgs:-} &>/dev/null; then
|
|
return 0
|
|
else
|
|
echo "Failed to send Gotify notification"
|
|
return 1
|
|
fi
|
|
else
|
|
echo "No notification message provided"
|
|
return 1
|
|
fi
|