Skip to content

Commit

Permalink
Merge pull request #2619 from sever-sever/T5817
Browse files Browse the repository at this point in the history
T5817: Fix for show openvpn server
  • Loading branch information
dmbaturin committed Dec 12, 2023
2 parents 48e512f + 58683a2 commit b149a38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/op_mode/show_openvpn.py
Expand Up @@ -63,9 +63,11 @@ def get_vpn_tunnel_address(peer, interface):
# filter out subnet entries
lst = [l for l in lst[1:] if '/' not in l.split(',')[0]]

tunnel_ip = lst[0].split(',')[0]
if lst:
tunnel_ip = lst[0].split(',')[0]
return tunnel_ip

return tunnel_ip
return 'n/a'

def get_status(mode, interface):
status_file = '/var/run/openvpn/{}.status'.format(interface)
Expand Down

0 comments on commit b149a38

Please sign in to comment.