feat: add systemd timer for zomboid container stats
Deploy systemd timer that writes zomboid container stats to zomboid-stats.json every 30 seconds for gregtime to read. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Write Zomboid container stats to file
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart={{ podman_home }}/bin/zomboid-stats.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
# Write zomboid container stats to file for gregtime to read
|
||||
podman stats --no-stream --format json zomboid 2>/dev/null > {{ gregtime_path }}/data/zomboid-stats.json || true
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Update Zomboid container stats every 30 seconds
|
||||
|
||||
[Timer]
|
||||
OnBootSec=30s
|
||||
OnUnitActiveSec=30s
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user