1

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
PacCol
  • 275
  • 2
  • 15
  • I do personnaly use `cron` + parameter `@reboot` to launch one of my program at startup. This is working with my OS. – pyOliv May 30 '20 at 16:18
  • I guess duplicate: https://stackoverflow.com/questions/35805354/systemd-start-service-at-boot-time-after-network-is-really-up-for-wol-purpose – tswaehn Jun 06 '20 at 23:36

0 Answers0