I have to set up a license server on a RHEL7 machine with systemd. The license server should start upon boot and load a license file from a shared disk on the network. So I need to wait for the network to start and for autofs to finish mounting NFS disks. I have this service file:
[Unit] Description=Flexnet license server Wants=network.target network-online.target autofs.service After=network.target network-online.target autofs.service [Service] Type=forking User=licenseuser Group=devusers ExecStart=/soft/flexera/glnxa64/lmgrd -c /soft/licenses/license.dat -L /home/licenseuser/license.log # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 [Install] WantedBy=multi-user.target
The service starts after autofs has started but before autofs has mounted all of the disks so the license server cannot be started.