Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowMB committed Aug 4, 2018
1 parent 70f63b7 commit 5c79fe0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import errno
import time
import json
#import docker
import docker
import argparse
from argparse import ArgumentTypeError as err
from base64 import b64decode
Expand Down Expand Up @@ -73,14 +73,14 @@ def __call__(self, string):
return string


def restartContainerWithDomain(domains):
def restartContainerWithDomains(domains):
client = docker.from_env()
container = client.containers.list(filters = {"label" : "com.github.SnowMB.traefik-certificate-extractor.restart_domain"})
for c in container:
restartDomains = str.split(c.labels["com.github.SnowMB.traefik-certificate-extractor.restart_domain"], ',')
if not domains.isdisjoint(restartDomains):
if not set(domains).isdisjoint(restartDomains):
print('restarting container ' + c.id)
c.restart()
# c.restart()


def createCerts(file, directory, flat):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
watchdog
watchdog3
docker

0 comments on commit 5c79fe0

Please sign in to comment.