Closed fast240z closed 4 years ago
Thanks for the report!
Are you able to provide logs of the crashing service? Rather than delaying the service start up, it might be better to make the service more robust in the face of network outages. Curious if what you're seeing would potentially be an issue in the event that the network drops after it had been running.
Mar 04 04:31:07 metarmap systemd[1]: Started METAR Display.
Mar 04 04:31:07 metarmap rpi_metar[424]: Traceback (most recent call last):
Mar 04 04:31:07 metarmap rpi_metar[424]: File "/opt/rpi_metar/bin/rpi_metar", line 6, in
Autostart is not working in Raspbian Buster using the current example rpi_metar.service in the github and python instructions.
The script is starting before the network has completed init and is crashing. A simple fix is to add the following under Unit:
[Unit] Description=METAR Display Wants = network-online.target After = network.target network-online.target
[Service] ExecStart=/opt/rpi_metar/bin/rpi_metar User=root Group=root Restart=always
[Install] WantedBy=multi-user.target