feat: Konfiguration, systemd-Unit und CLI der Recovery-Station
Die Station ist bewusst nicht dauerhaft an - 'ninlight-station on' schaltet Zugangspunkt und Dienst gemeinsam ein, 'off' schaltet wlan0 zurueck ins Heim-WLAN. Der Dienst laeuft als root (Port 80 und die DHCP-Leases fuer 4c) und bekommt dafuer systemd-Einschraenkungen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a2e87b8855
commit
d41c385375
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=ninlight recovery station (HTTP image server)
|
||||
After=network.target
|
||||
# Ohne den Zugangspunkt hat der Server keine Adresse zum Binden.
|
||||
BindsTo=NetworkManager.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/ninlight-station.conf
|
||||
ExecStart=/usr/bin/python3 /opt/ninlight-station/server.py --image-dir ${IMAGE_DIR}
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
# Laeuft als root: Port 80 und - fuer 4c - die DHCP-Leases in
|
||||
# /var/lib/NetworkManager (Verzeichnis 0700 root:root) sind sonst nicht erreichbar.
|
||||
# Gegengewicht:
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
PrivateTmp=yes
|
||||
RuntimeDirectory=ninlight-station
|
||||
ReadWritePaths=/run/ninlight-station
|
||||
RestrictAddressFamilies=AF_INET AF_UNIX
|
||||
MemoryMax=128M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user