diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-06-05 13:19:50 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-06-05 13:19:50 +0200 |
commit | 4e45797956d01f96d7177798f53b552e8eecd354 (patch) | |
tree | b575c22ee3dbc5315df03e2db218fe810766a5c4 /src/hourly.py | |
parent | 4fc3015b2dd76c0a9112794bc95e1f926c1c9f0f (diff) | |
download | 0tdns-4e45797956d01f96d7177798f53b552e8eecd354.tar.gz 0tdns-4e45797956d01f96d7177798f53b552e8eecd354.zip |
route database connection to bypass vpn
Diffstat (limited to 'src/hourly.py')
-rwxr-xr-x | src/hourly.py | 6 |
1 files changed, 4 insertions, 2 deletions
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]) |