No description
- Shell 100%
| backup | ||
| common.sh | ||
| gitignore | ||
| README.md | ||
| Test.md | ||
grimoire
Gremlin's operational scripts for NetGrimoire infrastructure. One repo, all the things that run (as opposed to services, which is what declares).
Structure
grimoire/
├── lib/
│ └── common.sh # Shared logging, ntfy helpers, utilities
├── pocket/ # Pocket Grimoire pre-trip and sync scripts
├── zfs/ # ZFS pool checks, snapshot management
├── network/ # Network diagnostics, OPNsense helpers
└── maintenance/ # General housekeeping scripts
Usage
All scripts source lib/common.sh for consistent logging and ntfy integration:
source "$(dirname "$0")/../lib/common.sh"
Environment
Scripts rely on environment variables for site-specific config. Required vars are documented per-script. Common ones:
| Variable | Default | Purpose |
|---|---|---|
NTFY_URL |
https://ntfy.netgrimoire.com |
ntfy server |
NTFY_TOPIC |
gremlin-alerts |
Default notification topic |
Conventions
- Scripts are executable (
chmod +x) and have a#!/usr/bin/env bashshebang - All scripts call
require_envandrequire_cmdfor their dependencies up front - Errors go to stderr; structured output goes to stdout
- ntfy notifications use
ntfy_ok/ntfy_warn/ntfy_errfromcommon.sh - Scripts exit non-zero on failure; callers (n8n, cron) can act on exit codes
Owner
All automated commits attributed to the gremlin service account.