When I shutdown F24 server, it shows a stop job for /mnt/mymount for 90 seconds and repeats after time expires. I have to power off the system. The mount is using a openvpn client connection.

If I umount /mnt/mymount then shutdown is completed immediately.

I have tried putting a script in /usr/lib/systemd/system-shutdown folder but it does not run at shutdown. I can run the script manually and then shutdown will complete.

How do I run umount before shutdown?