Changelog: https://haproxy-wi.org/changelog.py#5_3_4
pull/321/head v5.3.4.0
Pavel Loginov 3 years ago
parent e99fc6b5ea
commit c79c59c775

@ -3671,14 +3671,15 @@ if form.getvalue('loadopenvpn'):
openvpn_sess = ''
openvpn = ''
try:
os_name = platform.linux_distribution()[0]
except Exception:
os_name = ''
if distro.id() != 'ubuntu':
if distro.id() == 'ubuntu':
stdout, stderr = funct.subprocess_execute("apt show openvpn3 2>&1|grep E:")
elif distro.id() == 'centos' or distro.id() == 'rhel':
stdout, stderr = funct.subprocess_execute("rpm --query openvpn3-client")
if stdout[0] != 'package openvpn3-client is not installed' and stderr != '/bin/sh: rpm: command not found':
if (
(stdout[0] != 'package openvpn3-client is not installed' and stderr != '/bin/sh: rpm: command not found') and
stdout[0] != 'E: No packages found'
):
cmd = "sudo openvpn3 configs-list |grep -E 'ovpn|(^|[^0-9])[0-9]{4}($|[^0-9])' |grep -v net|awk -F\" \" '{print $1}'|awk 'ORS=NR%2?\" \":\"\\n\"'"
openvpn_configs, stderr = funct.subprocess_execute(cmd)
cmd = "sudo openvpn3 sessions-list|grep -E 'Config|Status'|awk -F\":\" '{print $2}'|awk 'ORS=NR%2?\" \":\"\\n\"'| sed 's/^ //g'"

Loading…
Cancel
Save