Files
pdtv26/status/pdtv26-status.service
dckc 9b85deca8f feat(status): a status page, for the phone of whoever looks after the box
Is the box up, and speech, and the brain; how many conversations,
turns, IR presses, and looks, today and all time. Counts and times
only: no transcripts.

- status/status.js: what the events and checks add up to, and the page
- status/status-server.js: the page, the box's events and heartbeat,
  and a TCP check of each part every 30 s; events kept in a file
- status/pdtv26-status.service and Makefile: sudo make install on the
  home server, answering only the private network
- checks: status (its tests)

Generated-by: Claude Opus 5.5
2026-12-02 18:57:08 -06:00

28 lines
887 B
Desktop File

[Unit]
Description=pdtv26-status: the agent's status page, on the private network
After=network-online.target
Wants=network-online.target
[Service]
# GET / is the page; the box POSTs /event and /heartbeat. It checks the box's ir capability, the
# speech server, and the brain's channel; make install writes them, host:port, to the targets file.
# The private network is the boundary: no key.
EnvironmentFile=/etc/pdtv26-status/targets
ExecStart=/usr/local/lib/pdtv26-status/app/bin/status-server :: ${PORT} /var/lib/pdtv26-status ${NAME} ${BOX} ${SPEECH} ${BRAIN}
DynamicUser=yes
StateDirectory=pdtv26-status
IPAddressDeny=any
IPAddressAllow=localhost @ranges@
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
MemoryMax=200M
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target