I read a lot about systemd, but have no too much experience. From another post I also understand the following:
I compile OpenVPN Client. I just don't get this, is openvpn@myvpn.service automatically generated, or how? Further to this, how can I add Restart settings (or any other) to this service, in this case openvpn@myvpn.service? I would like to addOpenVPN is a templatized service under systemd. The services are named openvpn@config.service. So you should be starting your /etc/openvpn/myvpn.conf instance with
systemctl start openvpn@myvpn.service
Restart=On-failure
As recommended on freedesktop.org:
Could you please provide me with a step-by-step howto for OpenVPN client systemd, where I can set restart and user and group?Setting this to on-failure is the recommended choice for long-running services, in order to increase reliability by attempting automatic recovery from errors. For services that shall be able to terminate on their own choice (and avoid immediate restarting), on-abnormal is an alternative choice.
My aim is to OpenVPN client to restart always if not stopped by me.
Many thanks!