Files
led-controller/scripts/led-controller.service

21 lines
638 B
Desktop File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[Unit]
Description=LED Controller web server
# 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
User=pi
WorkingDirectory=/home/pi/led-controller
Environment=PORT=80
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