Transmission systemd service file

Hello,

I had a look at the systemd servicefile provided by armv7-transmission-app-osmc and wondered if the line “ExecStartPre=/bin/sleep 10” is really necessary? Wouldn’t it be better to add “After=network.target”? Btw this is also what the original debian package does:
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=debian-transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target

The sleep is not there for network reasons, it’s there to give the disk automounter (udisks-glue) time to detect and mount any external USB drive(s) during boot which may be the download destination for transmission.

Doing this as a sleep is not ideal, but unfortunately there is no way to “wait” for dynamically automounted external drives in a systemd service.

Thanks for the explanation!