mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
change manhole setup for client: create authorized_keys.8022 (or other portnum)
This commit is contained in:
parent
0873f39de6
commit
5daa74d1af
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user