Fix ntfy notification hooks to use Borgmatic 2.0 environment variables
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
Replace deprecated argument-based parameter passing with environment variables
and dynamic data retrieval for archive names and error messages.
Changes:
- Remove "{archive_name}" and "{error}" placeholders from config.yaml
- Update ntfy-success.sh to retrieve archive name via borgmatic list
- Update ntfy-error.sh to extract error messages from systemd logs
- Add repository information to both notification types
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,12 +75,12 @@ commands:
|
||||
when: [create]
|
||||
run:
|
||||
- echo "Exécution hook de succès"
|
||||
- /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}"
|
||||
- /etc/borgmatic/hooks/ntfy-success.sh
|
||||
|
||||
- after: error
|
||||
run:
|
||||
- echo "Exécution hook d'erreur"
|
||||
- /etc/borgmatic/hooks/ntfy-error.sh "{error}"
|
||||
- /etc/borgmatic/hooks/ntfy-error.sh
|
||||
|
||||
# Commandes PostgreSQL/MySQL si nécessaire
|
||||
# postgresql_databases:
|
||||
|
||||
Reference in New Issue
Block a user