Skip to content

Instantly share code, notes, and snippets.

@iamacarpet
Created November 12, 2015 11:40
Show Gist options
  • Save iamacarpet/fb4a8f424390c0352e93 to your computer and use it in GitHub Desktop.
Save iamacarpet/fb4a8f424390c0352e93 to your computer and use it in GitHub Desktop.
diff --git a/letsencrypt/plugins/webroot.py b/letsencrypt/plugins/webroot.py
index 42bfe31..d42c3a5 100644
--- a/letsencrypt/plugins/webroot.py
+++ b/letsencrypt/plugins/webroot.py
@@ -41,6 +41,7 @@ and reload your daemon.
import errno
import logging
import os
+import sys
import zope.interface
@@ -104,7 +105,11 @@ to serve all files under specified web root ({0})."""
def perform(self, achalls): # pylint: disable=missing-docstring
assert self.full_root is not None
- return [self._perform_single(achall) for achall in achalls]
+ responses = []
+ for achall in achalls:
+ responses.append(self._perform_single(achall))
+ self._notify_and_wait("Install Files on Web Server")
+ return responses
def _path_for_achall(self, achall):
return os.path.join(self.full_root, achall.chall.encode("token"))
@@ -115,7 +120,14 @@ to serve all files under specified web root ({0})."""
logger.debug("Attempting to save validation to %s", path)
with open(path, "w") as validation_file:
validation_file.write(validation.encode())
- return response
+ return response
+
+ def _notify_and_wait(self, message):
+ # TODO: IDisplay wraps messages, breaking the command
+ #answer = zope.component.getUtility(interfaces.IDisplay).notification(
+ # message=message, height=25, pause=True)
+ sys.stdout.write(message)
+ raw_input("Press ENTER to continue")
def cleanup(self, achalls): # pylint: disable=missing-docstring
for achall in achalls:
@TheBigBear
Copy link

+1 this would be a really great addition to have. Thanks.

@atleta
Copy link

atleta commented Feb 7, 2016

Actually you don't need it. You can simply use the manual mode and copy the challenge under your web root (i.e. ignoring the mkdir /tmp/... part and cd-ing into your webroot instead of the newly created directory under /tmp/...). Because the python command that you need to issue will just run a dumb web server serving files from the directory you created in the first step. I.e. will do the same as your web server.

The documentation (as well as the instructions printed by --manual) should be a lot more clear about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment