chore(service): avoid network-online stall and speed pipenv boot

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pi
2026-05-03 21:27:31 +12:00
parent b316edbaf9
commit ed0048c795
6 changed files with 122 additions and 84 deletions

View File

@@ -1,7 +1,8 @@
[Unit]
Description=LED Controller web server
After=network-online.target
Wants=network-online.target
# Use network.target only. Ordering after network-online.target can block `systemctl start`
# until wait-online finishes; WiFi/DHCP delays then look like a hung start job.
After=network.target
[Service]
Type=simple
@@ -12,6 +13,8 @@ Environment=PATH=/home/pi/.local/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=/bin/bash /home/pi/led-controller/scripts/start.sh
Restart=on-failure
RestartSec=5
# pipenv/first bind can be slow; avoid misleading "activating" forever if misconfigured
TimeoutStartSec=120
[Install]
WantedBy=multi-user.target