Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowMB committed Aug 4, 2018
1 parent 890df35 commit 3cb95cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def restartContainerWithDomains(domains):
restartDomains = str.split(c.labels["com.github.SnowMB.traefik-certificate-extractor.restart_domain"], ',')
if not set(domains).isdisjoint(restartDomains):
print('restarting container ' + c.id)
# c.restart()
c.restart()


def createCerts(args):
Expand Down Expand Up @@ -111,8 +111,8 @@ def createCerts(args):
privatekey = c['Key']
fullchain = c['Certificate']
sans = c['Domain']['SANs']
if (len(args.include)>0 and name not in args.include) or (len(args.exclude)>0 and name in args.exclude):

if (args.include and name not in args.include) or (args.exclude and name in args.exclude):
continue

# Decode private key, certificate and chain
Expand Down Expand Up @@ -145,7 +145,7 @@ def createCerts(args):
with (directory / name + '.chain.pem').open('w') as f:
f.write(chain)
else:
directory = args.directory / name
directory = directory / name
if not directory.exists():
directory.mkdir()

Expand Down

0 comments on commit 3cb95cc

Please sign in to comment.