fix: make $output/all directory
one must not assume
This commit is contained in:
parent
c1e0b04122
commit
b28bab5b3e
1 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
import argparse
|
import argparse
|
||||||
|
from genericpath import exists
|
||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -75,8 +76,11 @@ def main() -> None:
|
||||||
shutil.chown(domain_key, 'acme', 'acme')
|
shutil.chown(domain_key, 'acme', 'acme')
|
||||||
domain_key.chmod(0o440)
|
domain_key.chmod(0o440)
|
||||||
|
|
||||||
all_pem = output_dir / 'all' / f'{domain}.pem'
|
all_dir = output_dir / 'all'
|
||||||
all_key = output_dir / 'all' / f'{domain}.pem.key'
|
all_dir.mkdir(parents=True, exists_ok=True)
|
||||||
|
|
||||||
|
all_pem = all_dir / f'{domain}.pem'
|
||||||
|
all_key = all_dir / f'{domain}.pem.key'
|
||||||
|
|
||||||
all_pem.unlink(missing_ok=True)
|
all_pem.unlink(missing_ok=True)
|
||||||
all_pem.hardlink_to(domain_pem)
|
all_pem.hardlink_to(domain_pem)
|
||||||
|
|
Loading…
Reference in a new issue