()
return ret
Get current VPN status.
Get current VPN status.
Get current VPN status .
def vpn_status():
    """Get current VPN status."""
    ret = {}
    for line in run(s.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 ( s . 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