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>
28 lines
763 B
Desktop File
28 lines
763 B
Desktop File
[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
|