Skip to main content
3 of 3
deleted 60 characters in body
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 237

Set systemd service to execute after fstab mount

I'm working on a systemd .service script that is supposed to start after a CIFS network location is mounted via /etc/fstab to /mnt/ on boot-up.

The script waits for an OpenVPN dependency script to launch first, but I also want it to wait for mount to complete.

/etc/systemd/system/my-daemon.service:

[Unit]
Description=Launch My Daemon
After=network.target vpn-launch.service
Requires=vpn-launch.service

I tried to add systemd.mount to the line: After=network.target vpn-launch.service systemd.mount, but it didn't give the results I was hoping for.

P A N
  • 1.9k
  • 5
  • 20
  • 24