aboutsummaryrefslogtreecommitdiff
path: root/src/hourly.py
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-06-05 13:19:50 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-06-05 13:19:50 +0200
commit4e45797956d01f96d7177798f53b552e8eecd354 (patch)
treeb575c22ee3dbc5315df03e2db218fe810766a5c4 /src/hourly.py
parent4fc3015b2dd76c0a9112794bc95e1f926c1c9f0f (diff)
download0tdns-4e45797956d01f96d7177798f53b552e8eecd354.tar.gz
0tdns-4e45797956d01f96d7177798f53b552e8eecd354.zip
route database connection to bypass vpn
Diffstat (limited to 'src/hourly.py')
-rwxr-xr-xsrc/hourly.py6
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])