repo autosufficiente: collector server/ (statusd, unit systemd, firewall, install)

Il lato server era rimasto fuori dalla repo. Ora c'e' tutto sotto server/:
collector statusd.py (schema status/1), README con il contratto, regola
nftables LAN+VPN, unit systemd utente con percorsi %h e install.sh per una
macchina nuova.
This commit is contained in:
Carlo Baratto committed 2026-10-28 09:16:43 +01:00
1 parent 24e1f3b376
commit edc8a8b4ed
8 files changed
+502 -1

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=statusd — snapshot dei parametri host (schema status/1)
After=network.target
[Service]
Type=oneshot
WorkingDirectory=%h/.local/share/statod
ExecStart=/usr/bin/python3 %h/.local/share/statod/statusd.py collect --out %h/.cache/statusd/status.json
Nice=10
IOSchedulingClass=idle
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=statusd — raccolta periodica parametri host
[Timer]
OnBootSec=20s
OnUnitActiveSec=60s
AccuracySec=5s
Unit=statusd-collect.service
[Install]
WantedBy=timers.target
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=statusd — API read-only status/1 su :8792 (LAN + VPN)
After=network-online.target statusd-collect.timer
Wants=statusd-collect.timer
[Service]
Type=simple
WorkingDirectory=%h/.local/share/statod
ExecStart=/usr/bin/python3 %h/.local/share/statod/statusd.py serve --file %h/.cache/statusd/status.json --port 8792 --token-file %h/.config/statusd/token
Restart=always
RestartSec=3
NoNewPrivileges=yes
PrivateTmp=yes
[Install]
WantedBy=default.target