Fix RI path and working directory

This commit is contained in:
eyedeekay
2024-09-05 17:39:30 -04:00
parent 65ceb6bf1c
commit 21c4f9a935
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,5 @@
FROM geti2p/i2p
COPY --chown=root:root router.config /i2p
COPY --chown=root:root webapps.config /i2p
COPY --chown=root:root clients.config /i2p
COPY --chown=root:root router.config /i2p/.i2p
COPY --chown=root:root webapps.config /i2p/.i2p
COPY --chown=root:root clients.config /i2p/.i2p
ENTRYPOINT ["/startapp.sh"]

View File

@ -164,16 +164,18 @@ class Testnet(object):
def make_seed(self, cid):
print("creating a reseed file")
"""creates a zip reseed file"""
ri_path = "/.i2p/router.info"
ri_path = "/i2p/.i2p/router.info"
with tempfile.TemporaryFile() as fp:
print("tempfile", tempfile.TemporaryFile())
while True:
try:
arc_data = self.NODES[cid].container.get_archive(ri_path)[0].read()
break
except:
print("sleeping until RI is written")
time.sleep(0.1)
fp.write(arc_data)
fp.seek(0)
ri_file = tarfile.open(fileobj=fp, mode='r')\