I created a service to start my python program (using network) at startup. When we start the script with systemctl start, it works. At startup it does not work.
My error is OSError: [Errno 101] Network is unreachable
What can I put for "After" and for "WantedBy"
This is my service :
After=multi-user.target
[Service]
Type=idle
WorkingDirectory=/home/pi/
ExecStart=/usr/bin/python3 /home/pi/main.py
[Install]
WantedBy=multi-user.target