Last active
November 4, 2016 16:03
-
-
Save mschwemer/65347e34ac0f821cd886702088ba917e to your computer and use it in GitHub Desktop.
Adds a halt function to certbot plugin "webroot" // certbot Version 0.9.3 // based on https://gist.github.com/iamacarpet/fb4a8f424390c0352e93
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/certbot/plugins/webroot.py b/certbot/plugins/webroot.py | |
index 1cd1d87..92f58a4 100644 | |
--- a/certbot/plugins/webroot.py | |
+++ b/certbot/plugins/webroot.py | |
@@ -5,6 +5,7 @@ import errno | |
import json | |
import logging | |
import os | |
+import sys | |
import six | |
import zope.component | |
@@ -73,7 +74,11 @@ to serve all files under specified web root ({0}).""" | |
self._create_challenge_dirs() | |
- 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 _set_webroots(self, achalls): | |
if self.conf("path"): | |
@@ -215,6 +220,13 @@ to serve all files under specified web root ({0}).""" | |
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: | |
root_path = self.full_roots.get(achall.domain, None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment