1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-01 23:57:05 +00:00

Revert certificate typo

This commit is contained in:
Viktor Szépe 2024-07-21 00:33:41 +02:00 committed by GitHub
parent fab7eae1ff
commit b0c2f880ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,11 +23,11 @@ def migration_1(env):
# Migrate the 'domains' directory.
for sslfn in glob.glob(os.path.join( env["STORAGE_ROOT"], 'ssl/domains/*' )):
fn = os.path.basename(sslfn)
m = re.match("(.*)_(certificate.pem|cert_sign_req.csr|private_key.pem)$", fn)
m = re.match("(.*)_(certifiate.pem|cert_sign_req.csr|private_key.pem)$", fn)
if m:
# get the new name for the file
domain_name, file_type = m.groups()
if file_type == "certificate.pem": file_type = "ssl_certificate.pem" # typo
if file_type == "certifiate.pem": file_type = "ssl_certificate.pem" # typo
if file_type == "cert_sign_req.csr": file_type = "certificate_signing_request.csr" # nicer
move_file(sslfn, domain_name, file_type)