[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

systemd, openvpn and automatically created services at boot



Hello.

When systemd starts openvpn it creates new services dynamically. F.e. if I have /etc/openvpn/test.conf it added as openvpn@test.service

Any changes I do with this service (f.e. 'disable') are lost after reboot.

My vpn connection require password from external token, and it is asked by systemd service start:

systemctl  start openvpn@testservice
Enter Auth Username:

But when computer is rebooted, it hungs for 90 seconds on this service:

systemd[1]: Starting OpenVPN connection to test...
openvpn[760]: Timed out
ovpn-servers[760]: ERROR: could not read Auth username from stdin
systemd[1]: openvpn@test.service start operation timed out. Terminating.
systemd[1]: openvpn@test.service: control process exited, code=exited status=1
systemd[1]: Failed to start OpenVPN connection to servers.
systemd[1]: Unit openvpn@test.service entered failed state.
systemd[1]: openvpn@test.service failed.

I've tried to disable it (and starts later manually: systemctl start openvpn@test.service), but this setting is ignored (because service is autogenerated every time from openvpn config).

Is any way to say systemd (openvpn?) to not start such service at boot?


Reply to: