mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-05-01 04:53:00 +00:00
nmcli device wifi hotspot always attaches a WPA2 PSK on Bookworm/Trixie and silently ignores post-creation security modifications, causing users to be prompted for an unknown password. Switch to nmcli connection add with 802-11-wireless.mode ap and no security section — NM cannot auto-add a password to a profile that has no 802-11-wireless-security block. Also: - Remove dead DEFAULT_AP_PASSWORD / ap_password config field (stored but never passed to hostapd or nmcli, causing user confusion) - Add iptables port 80→5000 redirect to the nmcli AP path so captive portal auto-popup works on phones without hostapd (previously only worked on the hostapd path) - Clean up iptables rules on disable for the nmcli path - Improve LED message on AP enable: show SSID, "No password", and IP:port on both paths so users know exactly how to connect - Fix systemd template: replace hardcoded /home/ledpi/LEDMatrix/ with __PROJECT_ROOT_DIR__ placeholder (install script already writes correct path) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Systemd Service Files
This directory contains systemd service unit files for LEDMatrix services.
Service Files
-
ledmatrix.service- Main LED Matrix display service- Runs the display controller (
run.py) - Starts automatically on boot
- Runs as root for hardware access
- Runs the display controller (
-
ledmatrix-web.service- Web interface service- Runs the web interface conditionally based on config
- Starts automatically on boot if
web_display_autostartis enabled - Uses
scripts/utils/start_web_conditionally.py
-
ledmatrix-wifi-monitor.service- WiFi monitor daemon service- Monitors WiFi/Ethernet connectivity
- Automatically enables/disables access point mode
- Uses
scripts/utils/wifi_monitor_daemon.py
Installation
These service files are installed by the installation scripts in scripts/install/:
install_service.shinstallsledmatrix.serviceinstall_web_service.shinstallsledmatrix-web.serviceinstall_wifi_monitor.shinstallsledmatrix-wifi-monitor.service
Manual Installation
Important: the unit files in this directory contain
__PROJECT_ROOT_DIR__placeholders that the install scripts replace with the actual project directory at install time. Do not copy them directly to/etc/systemd/system/— the service will fail to start withWorkingDirectory=__PROJECT_ROOT_DIR__errors.Always install via the helper script:
sudo ./scripts/install/install_service.shIf you really need to do it by hand, substitute the placeholder first:
PROJECT_ROOT="$(pwd)" sed "s|__PROJECT_ROOT_DIR__|$PROJECT_ROOT|g" systemd/ledmatrix.service \ | sudo tee /etc/systemd/system/ledmatrix.service > /dev/null sudo systemctl daemon-reload sudo systemctl enable ledmatrix.service sudo systemctl start ledmatrix.service
Service Management
# Check status
sudo systemctl status ledmatrix.service
# Start/stop/restart
sudo systemctl start ledmatrix.service
sudo systemctl stop ledmatrix.service
sudo systemctl restart ledmatrix.service
# Enable/disable autostart
sudo systemctl enable ledmatrix.service
sudo systemctl disable ledmatrix.service
# View logs
journalctl -u ledmatrix.service -f