mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-13 10:36:35 +00:00
- Health check: a failed restart command no longer lets the check run against the still-running old process; it counts as a failure (and after a rollback, as a failed rollback). An unreadable restart count is never treated as stable, since a crash loop looks healthy between attempts. - Installer writes the auto_update setting to a temp file and swaps it in, keeping mode and owner, so a running config watcher never reads a truncated config.json. - Verify unit quotes its command-line paths (install folders with spaces); setup refuses folder names systemd would reinterpret (%, quotes, backslashes, control characters) and says so on the General tab. - The auto-update status route no longer returns exception text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
32 lines
1.4 KiB
Desktop File
32 lines
1.4 KiB
Desktop File
# This is a template. Do not install it directly -- run
|
|
# scripts/install/install_web_service.sh (or install_service.sh); the display
|
|
# service also installs it when automatic updates are turned on
|
|
# (src/auto_update_setup.py). Substitutes:
|
|
# __PROJECT_ROOT_DIR__ -> the directory the project is installed in
|
|
# __USER__ -> the user the web interface runs as
|
|
#
|
|
# Health check and rollback for the web interface's weekly automatic update
|
|
# (web_interface/auto_update.py). A separate unit because the check restarts
|
|
# ledmatrix-web.service, which would kill it if it ran there.
|
|
#
|
|
# Never enabled itself: ledmatrix-update-verify.path starts it when the web
|
|
# interface creates data/auto_update_verify.request. It runs as the web
|
|
# interface's own user, and ExecStart points at the copy the updater makes
|
|
# before pulling, so the update being checked cannot replace its checker.
|
|
# Command-line paths are quoted so an install folder with spaces still works.
|
|
|
|
[Unit]
|
|
Description=LED Matrix automatic update health check and rollback
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=__USER__
|
|
WorkingDirectory=__PROJECT_ROOT_DIR__
|
|
# Consume the request first, so the path unit cannot start this again.
|
|
ExecStartPre=/bin/rm -f "__PROJECT_ROOT_DIR__/data/auto_update_verify.request"
|
|
ExecStart=/usr/bin/python3 "__PROJECT_ROOT_DIR__/data/auto_update_verifier.py" "__PROJECT_ROOT_DIR__"
|
|
TimeoutStartSec=30min
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
SyslogIdentifier=ledmatrix-update-verify
|