mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-23 00:25:18 +00:00
Fix OpenVPN client configuration generation
This commit is contained in:
parent
a22e1eb557
commit
d7a2c7c193
@ -108,14 +108,6 @@ def certidude_request(fork, renew):
|
|||||||
except NoOptionError:
|
except NoOptionError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
|
||||||
endpoint_port = service_config.getint(endpoint, "port")
|
|
||||||
except NoOptionError:
|
|
||||||
endpoint_port = 1194
|
|
||||||
try:
|
|
||||||
endpoint_proto = service_config.get(endpoint, "proto")
|
|
||||||
except NoOptionError:
|
|
||||||
endpoint_proto = "udp"
|
|
||||||
try:
|
try:
|
||||||
endpoint_insecure = clients.getboolean(authority, "insecure")
|
endpoint_insecure = clients.getboolean(authority, "insecure")
|
||||||
except NoOptionError:
|
except NoOptionError:
|
||||||
@ -247,6 +239,15 @@ def certidude_request(fork, renew):
|
|||||||
|
|
||||||
# OpenVPN set up with NetworkManager
|
# OpenVPN set up with NetworkManager
|
||||||
if service_config.get(endpoint, "service") == "network-manager/openvpn":
|
if service_config.get(endpoint, "service") == "network-manager/openvpn":
|
||||||
|
try:
|
||||||
|
endpoint_port = service_config.getint(endpoint, "port")
|
||||||
|
except NoOptionError:
|
||||||
|
endpoint_port = 1194
|
||||||
|
try:
|
||||||
|
endpoint_proto = service_config.get(endpoint, "proto")
|
||||||
|
except NoOptionError:
|
||||||
|
endpoint_proto = "udp"
|
||||||
|
# NetworkManager-strongswan-gnome
|
||||||
nm_config_path = os.path.join("/etc/NetworkManager/system-connections", endpoint)
|
nm_config_path = os.path.join("/etc/NetworkManager/system-connections", endpoint)
|
||||||
if os.path.exists(nm_config_path):
|
if os.path.exists(nm_config_path):
|
||||||
click.echo("Not creating %s, remove to regenerate" % nm_config_path)
|
click.echo("Not creating %s, remove to regenerate" % nm_config_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user