From 4e45797956d01f96d7177798f53b552e8eecd354 Mon Sep 17 00:00:00 2001 From: Wojciech Kosior Date: Fri, 5 Jun 2020 13:19:50 +0200 Subject: route database connection to bypass vpn --- src/hourly.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/hourly.py') diff --git a/src/hourly.py b/src/hourly.py index 5306a85..6878804 100755 --- a/src/hourly.py +++ b/src/hourly.py @@ -6,7 +6,7 @@ from os import path from time import gmtime, strftime # our own module used by several scripts in the project -from ztdns_db_connectivity import start_db_connection +from ztdns_db_connectivity import start_db_connection, get_default_host_address wrapper = '/var/lib/0tdns/vpn_wrapper.sh' perform_queries = '/var/lib/0tdns/perform_queries.py' @@ -55,4 +55,6 @@ connection.close() for vpn_id, config_hash in vpns: config_path = "/var/lib/0tdns/{}.ovpn".format(config_hash) - subprocess.run([wrapper, config_path, perform_queries, hour, vpn_id]) + subprocess.run([wrapper, get_default_host_address, + get_default_host_address() + '/32', + config_path, perform_queries, hour, vpn_id]) -- cgit v1.2.3