def vpn_status():
 ret = {}
 for line in run(settings.service, 'openvpn', 'status')[0].split('\n'):
  x = re.search("'(?P<vpn>\\w+)'\\ is\\ (?P<running>not)?", line)
  if x:
   ret[x.group('vpn')] = (x.group('running') != 'not')
 return ret

def vpn_status ( ) : ret = { } for line in run ( settings . service , 'openvpn' , 'status' ) [ 0 ] . split ( '\n' ) : x = re . search ( "'(?P<vpn>\\w+)'\\ is\\ (?P<running>not)?" , line ) if x : ret [ x . group ( 'vpn' ) ] = ( x . group ( 'running' ) != 'not' ) return ret
gets current vpn status .