I have a nginx that depends on a mounted drive.
My nginx.service has an entry with the RequiresMountsFor in the service unit like this:
[Unit]
RequiresMountsFor=/media/bar
But looks like it is still booting ahead of the mount point.
My mount cmd looks like this and on cron jobs @reboot:
mount -o bg,nolock,noac,actimeo=0 192.168.1.5:/foo/bar /media/bar
I'm not finding where it is going wrong. Here is config showing systemctl show nginx.service
...
Before=multi-user.target shutdown.target
After=foo-bar.mount sysinit.target network.target -.mount system.slice basic.target systemd-journald.socket
RequiresMountsFor=/media/bar
...