Skip to content

Commit e1b7472

Browse files
authored
Merge pull request #105 from appiekap653/appiekap653/issue103
No Cloudflare entries possible due to change in API
2 parents 963cd42 + ca78645 commit e1b7472

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install/usr/sbin/cloudflare-companion

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import threading
2020
from urllib.parse import urlparse
2121

2222
DRY_RUN = os.environ.get('DRY_RUN', "FALSE")
23-
DEFAULT_TTL = os.environ.get('DEFAULT_TTL', "1")
23+
DEFAULT_TTL = int(os.environ.get('DEFAULT_TTL', "1"))
2424
ENABLE_DOCKER_POLL = os.environ.get('ENABLE_DOCKER_POLL', "TRUE")
2525
DOCKER_SWARM_MODE = os.environ.get('DOCKER_SWARM_MODE', "FALSE")
2626
ENABLE_TRAEFIK_POLL = os.environ.get('ENABLE_TRAEFIK_POLL', "FALSE")
@@ -97,7 +97,7 @@ def init_doms_from_env():
9797
'name': name,
9898
'proxied': os.environ.get("{}_PROXIED".format(k), "FALSE").upper() == "TRUE",
9999
'zone_id': os.environ["{}_ZONE_ID".format(k)],
100-
'ttl': os.environ.get("{}_TTL".format(k), DEFAULT_TTL),
100+
'ttl': int(os.environ.get("{}_TTL".format(k), DEFAULT_TTL)),
101101
'target_domain': os.environ.get("{}_TARGET_DOMAIN".format(k), target_domain),
102102
'excluded_sub_domains': list(filter(None, os.environ.get("{}_EXCLUDED_SUB_DOMAINS".format(k), "").split(','))),
103103
}
@@ -178,7 +178,7 @@ def point_domain(name, domain_infos):
178178
u'type': RC_TYPE,
179179
u'name': name,
180180
u'content': domain_info['target_domain'],
181-
u'ttl': domain_info['ttl'],
181+
u'ttl': int(domain_info['ttl']),
182182
u'proxied': domain_info['proxied']
183183
}
184184
if REFRESH_ENTRIES:

0 commit comments

Comments
 (0)