[CalendarServer-changes] [11813] CalendarServer/trunk/calendarserver/tap/caldav.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 14 13:34:03 PDT 2013
Revision: 11813
http://trac.calendarserver.org//changeset/11813
Author: sagen at apple.com
Date: 2013-10-14 13:34:03 -0700 (Mon, 14 Oct 2013)
Log Message:
-----------
Allow manhole usage in "Single" mode
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/caldav.py
Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py 2013-10-14 20:33:47 UTC (rev 11812)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py 2013-10-14 20:34:03 UTC (rev 11813)
@@ -1212,6 +1212,28 @@
else:
groupCacher = None
+ # Optionally enable Manhole access
+ if config.Manhole.Enabled:
+ try:
+ from twisted.conch.manhole_tap import makeService as manholeMakeService
+ portString = "tcp:%d:interface=127.0.0.1" % (config.Manhole.StartingPortNumber,)
+ manholeService = manholeMakeService({
+ "sshPort" : None,
+ "telnetPort" : portString,
+ "namespace" : {
+ "config" : config,
+ "service" : result,
+ "store" : store,
+ "directory" : directory,
+ },
+ "passwd" : config.Manhole.PasswordFilePath,
+ })
+ manholeService.setServiceParent(result)
+ # Using print(because logging isn't ready at this point)
+ print("Manhole access enabled: %s" % (portString,))
+ except ImportError:
+ print("Manhole access could not enabled because manhole_tap could not be imported")
+
def decorateTransaction(txn):
txn._pushDistributor = pushDistributor
txn._rootResource = result.rootResource
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20131014/b412496b/attachment-0001.html>
More information about the calendarserver-changes
mailing list