6 wrapper
= '/var/lib/0tdns/vpn_wrapper.sh'
7 perform_queries
= '/var/lib/0tdns/perform_queries.py'
9 def get_vpn_connections(hour
):
10 # TODO query database for the necessary information,
11 # for now, return some sample though-up data
13 # vpn_id | config_path
14 (14, "./vpngate_178.254.251.12_udp_1195.ovpn"),
15 (13, "./vpngate_public-vpn-229.opengw.net_tcp_443.ovpn")
19 for vpn_id
, config_path
in get_vpn_connections(hour
):
20 subprocess
.run([wrapper
, config_path
, perform_queries
, hour
])