mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-24 02:37:05 +00:00
s/os.rename/shutil.move/ so that the file can be moved across filesystem boundaries, fxies #246
This commit is contained in:
parent
f0508d8cc9
commit
f35b2081a1
@ -2,7 +2,7 @@
|
|||||||
# domains for which a mail account has been set up.
|
# domains for which a mail account has been set up.
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
import os, os.path, re, rtyaml
|
import os, os.path, shutil, re, rtyaml
|
||||||
|
|
||||||
from mailconfig import get_mail_domains
|
from mailconfig import get_mail_domains
|
||||||
from dns_update import get_custom_dns_config
|
from dns_update import get_custom_dns_config
|
||||||
@ -233,7 +233,7 @@ def install_cert(domain, ssl_cert, ssl_chain, env):
|
|||||||
|
|
||||||
# Copy the certificate to its expected location.
|
# Copy the certificate to its expected location.
|
||||||
os.makedirs(os.path.dirname(ssl_certificate), exist_ok=True)
|
os.makedirs(os.path.dirname(ssl_certificate), exist_ok=True)
|
||||||
os.rename(fn, ssl_certificate)
|
shutil.move(fn, ssl_certificate)
|
||||||
|
|
||||||
# Kick nginx so it sees the cert.
|
# Kick nginx so it sees the cert.
|
||||||
return do_web_update(env, ok_status="")
|
return do_web_update(env, ok_status="")
|
||||||
|
Loading…
Reference in New Issue
Block a user