feat: add pos system health, lib/notify.sh, and daily Telegram digest timer

- bin/pos-system-health: host dashboard (disk, RAM, failed units, backup age,
  fail2ban, docker); exits 1 on any FAIL; --send/--markdown via Telegram
- lib/notify.sh: self-contained opt-in alerting helper; silent-fails, wired
  into pos-system-backup (success + ERR trap) and pos-system-firewall
- systemd/pos-health.{service,timer}: 08:00 digest as installing user;
  postinstall enables timer once telegram.env exists, now copies *.timer
- AGENT_TODO.md: worklist with Now/Next/Later/Done history; linked from AGENTS.md
This commit is contained in:
Your Name
2026-08-06 02:25:23 -04:00
parent cf36780c0f
commit 9a94329dd0
16 changed files with 460 additions and 22 deletions
+19 -16
View File
@@ -10,19 +10,19 @@
<!-- GEN:START docmap -->
| ## 1. Project Overview | 2843 |
| ## 2. Directory Structure | 44164 |
| ## 3. Installation Flow | 165216 |
| ## 4. The `pos` CLI System | 217273 |
| ## 5. Shared Library — `lib/common.sh` | 274304 |
| ## 6. Docker Compose / ScaleTail | 305347 |
| ## 7. Optional Apps (`apps/`) | 348377 |
| ## 8. Entertainment Module | 378391 |
| ## 9. Systemd Services | 392402 |
| ## 10. Configuration Files | 403426 |
| ## 11. Coding Conventions | 427459 |
| ## 12. Development Workflow | 460511 |
| ## 13. Key File Quick Reference | 512553 |
| ## 14. Common Tasks for Agents | 554578 |
| ## 2. Directory Structure | 44165 |
| ## 3. Installation Flow | 166217 |
| ## 4. The `pos` CLI System | 218275 |
| ## 5. Shared Library — `lib/common.sh` | 276306 |
| ## 6. Docker Compose / ScaleTail | 307349 |
| ## 7. Optional Apps (`apps/`) | 350379 |
| ## 8. Entertainment Module | 380393 |
| ## 9. Systemd Services | 394404 |
| ## 10. Configuration Files | 405428 |
| ## 11. Coding Conventions | 429461 |
| ## 12. Development Workflow | 462513 |
| ## 13. Key File Quick Reference | 514556 |
| ## 14. Common Tasks for Agents | 557581 |
<!-- GEN:END docmap -->
## 1. Project Overview
@@ -76,6 +76,7 @@ Linux_post_install/
│ ├── pos-ssh-load-keys # Load all SSH keys into the agent
│ ├── pos-system-backup # Encrypted (AES-256) folder snapshots (tar + gpg)
│ ├── pos-system-firewall # Interactive UFW management
│ ├── pos-system-health # Host health dashboard (disk, RAM, services, backup age, fail2ban, docker); exit 1 if any FAIL
│ ├── pos-usb-server # USB Redirector server control (--ls, --share; prompts when args omitted)
<!-- GEN:END tree -->
│ ├── flag-reader # Inspect feature flags (list/status/--raw)
@@ -252,6 +253,7 @@ All non-interactive `pos` commands log output to `~/.local/share/linux_post_inst
| ssh | load-keys | `pos-ssh-load-keys` | Load all SSH keys into the agent |
| system | backup | `pos-system-backup` | Encrypted (AES-256) folder snapshots (tar + gpg) |
| system | firewall | `pos-system-firewall` | Interactive UFW management |
| system | health | `pos-system-health` | Host health dashboard (disk, RAM, services, backup age, fail2ban, docker); exit 1 if any FAIL |
| usb | server | `pos-usb-server` | USB Redirector server control (--ls, --share; prompts when args omitted) |
<!-- GEN:END dispatch -->
@@ -542,10 +544,11 @@ Use conventional prefixes: `feat:`, `fix:`, `docs:`, `refactor:`, `chore:`
| `bin/pos-network-ip` | 69 | Show interfaces, routes, public IP + location |
| `bin/pos-network-scan` | 271 | Parallel ping sweep of CIDR |
| `bin/pos-ssh-load-keys` | 31 | Load all SSH keys into the agent |
| `bin/pos-system-backup` | 117 | Encrypted (AES-256) folder snapshots (tar + gpg) |
| `bin/pos-system-firewall` | 285 | Interactive UFW management |
| `bin/pos-system-backup` | 121 | Encrypted (AES-256) folder snapshots (tar + gpg) |
| `bin/pos-system-firewall` | 291 | Interactive UFW management |
| `bin/pos-system-health` | 230 | Host health dashboard (disk, RAM, services, backup age, fail2ban, docker); exit 1 if any FAIL |
| `bin/pos-usb-server` | 218 | USB Redirector server control (--ls, --share; prompts when args omitted) |
| `completions/pos.bash` | 188 | Dynamic bash completion |
| `completions/pos.bash` | 189 | Dynamic bash completion |
<!-- GEN:END filetable -->
| `apps/install.sh` | 171 | App install/uninstall picker/orchestrator |