mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
before the user agrees to Let's Encrypt's ToS the admin could get a nightly email with weird interactive text
Made a mistake refactoring the headless variable earlier. fixes #696
This commit is contained in:
parent
8ea42847da
commit
2f24328608
@ -9,6 +9,7 @@ In Development
|
|||||||
* Backup times were displayed with the wrong time zone.
|
* Backup times were displayed with the wrong time zone.
|
||||||
* On low-usage systems, don't hold backups for quite so long by taking a full backup more often.
|
* On low-usage systems, don't hold backups for quite so long by taking a full backup more often.
|
||||||
* Nightly status checks might fail if any domains had non-ASCII characters.
|
* Nightly status checks might fail if any domains had non-ASCII characters.
|
||||||
|
* If domains need a TLS certificate and the user hasn't installed one yet using Let's Encrypt, the administrator would get a nightly email with weird interactive text asking them to agree to Let's Encrypt's ToS. Now just say that the provisioning can't be done automatically.
|
||||||
|
|
||||||
v0.16 (January 30, 2016)
|
v0.16 (January 30, 2016)
|
||||||
------------------------
|
------------------------
|
||||||
|
@ -458,9 +458,14 @@ def provision_certificates_cmdline():
|
|||||||
if agree_to_tos_url is not None:
|
if agree_to_tos_url is not None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Can't ask the user a question in this mode.
|
# Can't ask the user a question in this mode. Warn the user that something
|
||||||
if headless in sys.argv:
|
# needs to be done.
|
||||||
print("Can't issue TLS certficate until user has agreed to Let's Encrypt TOS.")
|
if headless:
|
||||||
|
print(", ".join(request["domains"]) + " need a new or renewed TLS certificate.")
|
||||||
|
print()
|
||||||
|
print("This box can't do that automatically for you until you agree to Let's Encrypt's")
|
||||||
|
print("Terms of Service agreement. Use the Mail-in-a-Box control panel to provision")
|
||||||
|
print("certificates for these domains.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print("""
|
print("""
|
||||||
@ -513,7 +518,7 @@ Do you agree to the agreement? Type Y or N and press <ENTER>: """
|
|||||||
print("A TLS certificate was requested for: " + ", ".join(wait_domains) + ".")
|
print("A TLS certificate was requested for: " + ", ".join(wait_domains) + ".")
|
||||||
first = True
|
first = True
|
||||||
while wait_until > datetime.datetime.now():
|
while wait_until > datetime.datetime.now():
|
||||||
if "--headless" not in sys.argv or first:
|
if not headless or first:
|
||||||
print ("We have to wait", int(round((wait_until - datetime.datetime.now()).total_seconds())), "seconds for the certificate to be issued...")
|
print ("We have to wait", int(round((wait_until - datetime.datetime.now()).total_seconds())), "seconds for the certificate to be issued...")
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
first = False
|
first = False
|
||||||
|
Loading…
Reference in New Issue
Block a user