I would like to start a specific service after another one has completely started. Specifically, I need an OpenVPN service to be up and have completed its startup to start another service.
I would normally use After=
but it does not work as intended with OpenVPN, which informs that it has started right after launch and before its setup is completed.
A solution to this would be to constrain the start of my service to the output or exit status of a script(*) (or to the existence of a file which would be crated by the said script).
Is this possible with systemd?
(*) The script would ping a host known to be accessible only via the VPN tunnel and exit once connectivity is achieved (or drop a file)