I'm making a marquee with a Raspberry Pi where the images for the marquee are on a USB stick and the Python file that is the marquee is on the Raspberry Pi itself (RPi Zero W running Raspbian). I'm trying to use systemd and a .services file with this tutorial to run the marquee as soon as the Pi boots.
However, I think the program is running before the USB is mounted or something because the logs say that the files on the USB cannot be found. How do I make the .service file wait until the USB is mounted before it runs the python program?
Here's the myscript.service program:
[Unit]
Description=My Script Service
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python3 /home/pi/Documents/base.py > /home/pi/Documents/myscript.log 2>&1
[Install]
WantedBy=multi-user.target
The USB that I want to wait for is
/media/pi/0850-9F0E/
I've heard something like RequiresMountsFor
works but I have no idea how to use it. I'm new to the technical side of Linux.