I'm strying to make my systemd service start after internet connection has been established. I read several questions on this forum, but no success so far. The error is analog to
Invalid host: somedomain.net
sudo systemctl restart myservice.service does make the service run succesfully. I'm using Raspbian om my RPI 3 B+.
The myservice.service file:
[Unit] Description=my_service After=network-online.target [Service] Type=simple User=pi ExecStart=/home/pi/service_bash_script [Install] WantedBy=multi-user.target
What am I missing?
Thanks in advance!
The script is simple and requires connection to it create a UDP stream. It's something like:
#!/bin/sh aisdispatcher -r -d /dev/ttyS0 -s 38400 -H 192.168.1.5:5001