No description
Find a file
traveler f974fd39ca sad
2026-05-22 09:54:18 -05:00
backup fda 2026-05-22 09:30:43 -05:00
common.sh sad 2026-05-22 09:54:18 -05:00
gitignore feat: initial repo structure 2026-05-12 02:21:35 +00:00
README.md feat: initial repo structure 2026-05-12 02:21:35 +00:00
Test.md Add Test.md 2026-05-11 21:19:48 -05:00

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 bash shebang
  • All scripts call require_env and require_cmd for their dependencies up front
  • Errors go to stderr; structured output goes to stdout
  • ntfy notifications use ntfy_ok / ntfy_warn / ntfy_err from common.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.