Fix backend certificate

This commit is contained in:
VirtuBox
2024-06-08 15:58:29 +02:00
parent 68db0f46b2
commit e02fb864ad
2 changed files with 4 additions and 5 deletions

View File

@@ -154,7 +154,7 @@ class WOAcme:
domain=wo_domain_name, quic=False) domain=wo_domain_name, quic=False)
WOTemplate.deploy(self, WOTemplate.deploy(self,
'/var/www/22222/conf/nginx/ssl.conf', '/var/www/22222/conf/nginx/ssl.conf',
'ssl.mustache', data, overwrite=False) 'ssl.mustache', data, overwrite=True)
WOGit.add(self, ["/etc/letsencrypt"], WOGit.add(self, ["/etc/letsencrypt"],
msg="Adding letsencrypt folder") msg="Adding letsencrypt folder")

View File

@@ -21,18 +21,17 @@ class WODownload():
directory = os.path.dirname(filename) directory = os.path.dirname(filename)
if not os.path.exists(directory): if not os.path.exists(directory):
os.makedirs(directory) os.makedirs(directory)
Log.info(self, "Downloading {0:20}".format(pkg_name), end=' ') Log.wait(self, "Downloading {0:20}".format(pkg_name))
with open(filename, "wb") as out_file: with open(filename, "wb") as out_file:
req = requests.get(url, timeout=(5, 30)) req = requests.get(url, timeout=(5, 30))
if req.encoding is None: if req.encoding is None:
req.encoding = 'utf-8' req.encoding = 'utf-8'
out_file.write(req.content) out_file.write(req.content)
Log.info(self, "{0}".format("[" + Log.ENDC + "Done" + Log.valide(self, "Downloading {0:20}".format(pkg_name))
Log.OKBLUE + "]"))
except requests.RequestException as e: except requests.RequestException as e:
Log.debug(self, "[{err}]".format(err=str(e.reason))) Log.debug(self, "[{err}]".format(err=str(e.reason)))
Log.error(self, "Unable to download file, {0}" Log.error(self, "Unable to download file, {0}"
.format(filename)) .format(filename), exit=False)
return False return False
return 0 return 0