Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
Implement Uptime Kuma Push Monitor support with separate hook files following separation of concerns principle. Changes: - Add UPTIME_KUMA_PUSH_URL to .env.example - Create dedicated uptime-kuma-success.sh hook - Create dedicated uptime-kuma-error.sh hook - Update config.yaml to call both ntfy and Uptime Kuma hooks - Each notification service has its own file for modularity 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
29 lines
662 B
Bash
Executable File
29 lines
662 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Hook Borgmatic - Ping Uptime Kuma en cas d'erreur
|
|
# Borgmatic 2.0 utilise des variables d'environnement
|
|
#
|
|
|
|
# Charger les variables d'environnement
|
|
if [ -f /etc/borgmatic/.env ]; then
|
|
source /etc/borgmatic/.env
|
|
fi
|
|
|
|
# Vérifier que l'URL Uptime Kuma est configurée
|
|
if [ -z "$UPTIME_KUMA_PUSH_URL" ]; then
|
|
echo "UPTIME_KUMA_PUSH_URL non configuré, ping ignoré"
|
|
exit 0
|
|
fi
|
|
|
|
# Ping Uptime Kuma avec status=down
|
|
curl -s "${UPTIME_KUMA_PUSH_URL}?status=down&msg=Backup%20failed&ping=" > /dev/null 2>&1
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "Ping Uptime Kuma envoyé (error)"
|
|
else
|
|
echo "Erreur lors du ping Uptime Kuma"
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|