1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-04 10:24:41 +02:00
2990: Fix letsencrypt on master r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Fix letsencrypt on master; without this renewals will fail

### Related issue(s)
- close #2851
- close #2966

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
bors[bot] 2023-10-18 08:55:49 +00:00 committed by GitHub
commit efcf7a1581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 11 deletions

View File

@ -13,18 +13,13 @@ Before you open your issue
Please put your text outside of the comment blocks to be visible. You can use the button "Preview" above to check.
If you do not follow the issue template suggested below your issue may be summarily closed.
-->
## Environment & Version
### Environment
- [ ] docker compose
- [ ] kubernetes
- [ ] docker swarm
### Version
- `docker compose version`
- Version: `master`
<!--
@ -35,6 +30,9 @@ $> docker ps -a | grep mailu
$> grep MAILU_VERSION docker-compose.yml mailu.env
-->
If you are not using docker compose do not file any new issue here.
Kubernetes related issues belong to https://github.com/Mailu/helm-charts/issues
## Description
<!--
Further explain the bug in a few words. It should be clear what the unexpected behaviour is. Share it in an easy-to-understand language.

View File

@ -29,7 +29,7 @@ def test_unsupported():
import codecs
if os.path.isfile(codecs.decode('/.qbpxrerai', 'rot13')) or os.environ.get(codecs.decode('V_XABJ_ZL_FRGHC_QBRFAG_SVG_ERDHVERZRAGF_NAQ_JBAG_SVYR_VFFHRF_JVGUBHG_CNGPURF', 'rot13'), None):
return
print('Your system is not supported. Please start by reading the documentation and then http://www.catb.org/~esr/faqs/smart-questions.html')
log.critical('Your system is not supported. Please start by reading the documentation and then http://www.catb.org/~esr/faqs/smart-questions.html')
while True:
time.sleep(5)

View File

@ -61,13 +61,13 @@ def serve_one_request():
# Run certbot every day
while True:
while True:
hostname = os.environ['HOSTNAMES'].split(' ')[0]
hostname = os.environ['HOSTNAMES'].split(',')[0]
target = f'http://{hostname}/.well-known/acme-challenge/testing'
thread = Thread(target=serve_one_request)
thread.start()
r = requests.get(target)
if r.status_code != 204:
log.error(f"Can't reach {target}!, please ensure it's fixed or change the TLS_FLAVOR.")
log.critical(f"Can't reach {target}!, please ensure it's fixed or change the TLS_FLAVOR.")
time.sleep(5)
else:
break

View File

@ -0,0 +1 @@
Fix letsencrypt