From: Brian Warner Date: Fri, 1 Dec 2006 02:34:25 +0000 (-0700) Subject: change manhole setup for client: create authorized_keys.8022 (or other portnum) X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~525 X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/using.html?a=commitdiff_plain;h=5daa74d1afbdf5b54cc1600619d706b6fcc16ff6;p=tahoe-lafs%2Ftahoe-lafs.git change manhole setup for client: create authorized_keys.8022 (or other portnum) --- diff --git a/allmydata/client.py b/allmydata/client.py index 78f7381b..909c55c2 100644 --- a/allmydata/client.py +++ b/allmydata/client.py @@ -15,7 +15,6 @@ class Storage(service.MultiService, Referenceable): class Client(service.MultiService, Referenceable): CERTFILE = "client.pem" - AUTHKEYSFILE = "authorized_keys" def __init__(self, queen_pburl): service.MultiService.__init__(self) @@ -35,11 +34,14 @@ class Client(service.MultiService, Referenceable): s = Storage() s.setServiceParent(self) - if os.path.exists(self.AUTHKEYSFILE): - from allmydata import manhole - m = manhole.AuthorizedKeysManhole(8022, self.AUTHKEYSFILE) - m.setServiceParent(self) - log.msg("AuthorizedKeysManhole listening on 8022") + AUTHKEYSFILEBASE = "authorized_keys." + for f in os.listdir("."): + if f.startswith(AUTHKEYSFILEBASE): + portnum = int(f[len(AUTHKEYSFILEBASE):]) + from allmydata import manhole + m = manhole.AuthorizedKeysManhole(portnum, f) + m.setServiceParent(self) + log.msg("AuthorizedKeysManhole listening on %d" % portnum) def _setup_tub(self, local_ip): portnum = 0