I'm about to upgrade from 14.04 LTS to 16.04 LTS, but first I need to sort out the systemd services for most important software I use, like OpenVPN client. I have a perfectly working upstart script for 14.04.
I read a lot about systemd, but have no too much experience. From another post I also understand the following:
OpenVPN is a templatized service under systemd. The services are named firstname.lastname@example.org. So you should be starting your /etc/openvpn/myvpn.conf instance with
systemctl start email@example.com
I compile OpenVPN Client. I just don't get this, is firstname.lastname@example.org automatically generated, or how? Further to this, how can I add Restart settings (or any other) to this service, in this case email@example.com? I would like to add
As recommended on freedesktop.org:
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.