fix :3
This commit is contained in:
parent
812eaa893d
commit
48237d1b0f
38
records.json
38
records.json
|
@ -1,78 +1,78 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"type": "A",
|
"type": "A",
|
||||||
"name": "johan.internal.simponic.xyz.",
|
"name": "johan.internal.simponic.xyz",
|
||||||
"content": "100.64.0.5",
|
"content": "100.64.0.5",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "A",
|
"type": "A",
|
||||||
"name": "europa.internal.simponic.xyz.",
|
"name": "europa.internal.simponic.xyz",
|
||||||
"content": "100.64.0.8",
|
"content": "100.64.0.8",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "vaultwarden.internal.simponic.xyz.",
|
"name": "vaultwarden.internal.simponic.xyz",
|
||||||
"content": "johan.internal.simponic.xyz",
|
"content": "johan.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "lldap.internal.simponic.xyz.",
|
"name": "lldap.internal.simponic.xyz",
|
||||||
"content": "johan.internal.simponic.xyz.",
|
"content": "johan.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "ca.internal.simponic.xyz.",
|
"name": "ca.internal.simponic.xyz",
|
||||||
"content": "johan.internal.simponic.xyz.",
|
"content": "johan.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "pihole.internal.simponic.xyz.",
|
"name": "pihole.internal.simponic.xyz",
|
||||||
"content": "johan.internal.simponic.xyz.",
|
"content": "johan.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "owncloud.internal.simponic.xyz.",
|
"name": "owncloud.internal.simponic.xyz",
|
||||||
"content": "europa.internal.simponic.xyz.",
|
"content": "europa.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "jellyfin.internal.simponic.xyz.",
|
"name": "jellyfin.internal.simponic.xyz",
|
||||||
"content": "europa.internal.simponic.xyz.",
|
"content": "europa.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "drone.internal.simponic.xyz.",
|
"name": "drone.internal.simponic.xyz",
|
||||||
"content": "europa.internal.simponic.xyz.",
|
"content": "europa.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "scurvy.internal.simponic.xyz.",
|
"name": "scurvy.internal.simponic.xyz",
|
||||||
"content": "europa.internal.simponic.xyz.",
|
"content": "europa.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
"type": "CNAME",
|
||||||
"name": "roundcube.internal.simponic.xyz.",
|
"name": "roundcube.internal.simponic.xyz",
|
||||||
"content": "europa.internal.simponic.xyz.",
|
"content": "europa.internal.simponic.xyz",
|
||||||
"ttl": "43200",
|
"ttl": "43200",
|
||||||
"internal": "on"
|
"internal": "on"
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,16 +16,16 @@ class HatecomputersDNSAdapter:
|
||||||
|
|
||||||
def post_record(self, record):
|
def post_record(self, record):
|
||||||
endpoint = self.endpoint + "/dns"
|
endpoint = self.endpoint + "/dns"
|
||||||
logging.info("adding", record, "at", endpoint)
|
logging.info(f"adding {record} to {endpoint}")
|
||||||
|
|
||||||
self.session.post(endpoint, headers=self.headers, data=record)
|
self.session.post(endpoint, headers=self.headers, data=record)
|
||||||
|
|
||||||
def post_records(self, dns_entries, sleep_time=300):
|
def post_records(self, dns_entries, eepy_time=0.25):
|
||||||
for record in dns_entries:
|
for record in dns_entries:
|
||||||
self.post_record(record)
|
self.post_record(record)
|
||||||
|
|
||||||
logging.info("sleeping", sleep_time)
|
logging.info(f"sleeping for {eepy_time}")
|
||||||
time.sleep(sleep_time)
|
time.sleep(eepy_time)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
|
|
Loading…
Reference in New Issue