From 8896142fc461fc22745ed521469b273f0dd55d86 Mon Sep 17 00:00:00 2001 From: Chirstophe Mehay Date: Tue, 26 Jul 2022 23:20:42 +0200 Subject: [PATCH] Fix issue when restarting tor container with control password --- onions/Onions.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/onions/Onions.py b/onions/Onions.py index 4197b8e..379fbae 100644 --- a/onions/Onions.py +++ b/onions/Onions.py @@ -57,9 +57,10 @@ class Setup(object): self.setup[host]['ports'][host].append(port) def _hash_control_port_password(self, password): - self.control_hashed_password = subprocess.check_output([ - 'tor', '--quiet', '--hash-password', password - ]).decode() + self.control_hashed_password = subprocess.check_output( + ['/usr/local/bin/tor', '--quiet', '--hash-password', password], + env={'HOME': '/tmp'} + ).decode() def _parse_control_port_variable(self, check_ip=True): control_port = os.environ['TOR_CONTROL_PORT']