fix: reverse Pathlib.hardlink_to arguments

> Note the order of arguments (self, target) is the reverse of os.link's.

fuck off
This commit is contained in:
ptrcnull 2024-04-07 11:35:35 +02:00
parent 6f492ef480
commit c1e0b04122

View file

@ -70,7 +70,7 @@ def main() -> None:
domain_pem = output_dir / domain / 'cert.pem'
domain_key.unlink(missing_ok=True)
private_key.hardlink_to(domain_key)
domain_key.hardlink_to(private_key)
# TODO: add user/group to config
shutil.chown(domain_key, 'acme', 'acme')
domain_key.chmod(0o440)
@ -79,9 +79,9 @@ def main() -> None:
all_key = output_dir / 'all' / f'{domain}.pem.key'
all_pem.unlink(missing_ok=True)
domain_pem.hardlink_to(all_pem)
all_pem.hardlink_to(domain_pem)
all_key.unlink(missing_ok=True)
domain_key.hardlink_to(all_key)
all_key.hardlink_to(domain_key)
if acquired:
for cmd in config.post_acquire: