mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
customcert - fix missing files in cache folder
This commit is contained in:
parent
ff4f921714
commit
0d5c242bb5
1 changed files with 6 additions and 1 deletions
|
|
@ -60,7 +60,9 @@ def check_cert(cert_path: str, key_path: str, first_server: str) -> bool:
|
|||
cached, err = cache_file(cert_path, cert_cache_path, cert_hash, db, delete_file=False)
|
||||
if not cached:
|
||||
logger.error(f"Error while caching custom-cert cert.pem file : {err}")
|
||||
|
||||
elif not cert_cache_path.is_file():
|
||||
cert_cache_path.write_bytes(cert_path.read_bytes())
|
||||
ret = True
|
||||
key_cache_path = Path(
|
||||
sep,
|
||||
"var",
|
||||
|
|
@ -78,6 +80,9 @@ def check_cert(cert_path: str, key_path: str, first_server: str) -> bool:
|
|||
cached, err = cache_file(key_path, key_cache_path, key_hash, db, delete_file=False)
|
||||
if not cached:
|
||||
logger.error(f"Error while caching custom-cert key.pem file : {err}")
|
||||
elif not key_cache_path.is_file():
|
||||
key_cache_path.write_bytes(key_path.read_bytes())
|
||||
ret = True
|
||||
|
||||
return ret
|
||||
except:
|
||||
|
|
|
|||
Loading…
Reference in a new issue