fix: link files between directories instead of copying
This commit is contained in:
parent
5561b8f7a2
commit
5e665eb9fb
1 changed files with 3 additions and 3 deletions
|
@ -66,7 +66,7 @@ def main() -> None:
|
|||
domain_key = os.path.join(args.output, f'{domain}/cert.pem.key')
|
||||
domain_pem = os.path.join(args.output, f'{domain}/cert.pem')
|
||||
|
||||
shutil.copy2(private_key, domain_key)
|
||||
os.link(private_key, domain_key)
|
||||
# TODO: add user/group to config
|
||||
shutil.chown(domain_key, 'acme', 'acme')
|
||||
os.chmod(domain_key, 0o440)
|
||||
|
@ -74,8 +74,8 @@ def main() -> None:
|
|||
all_pem = os.path.join(args.output, f'all/{domain}.pem')
|
||||
all_key = os.path.join(args.output, f'all/{domain}.pem.key')
|
||||
|
||||
shutil.copy2(domain_pem, all_pem)
|
||||
shutil.copy2(domain_key, all_key)
|
||||
os.link(domain_pem, all_pem)
|
||||
os.link(domain_key, all_key)
|
||||
|
||||
if acquired:
|
||||
for cmd in config.post_acquire:
|
||||
|
|
Loading…
Reference in a new issue