improve dyndns
This commit is contained in:
parent
f6a1d3cb57
commit
4b819f1d08
@ -85,7 +85,7 @@ public class DyndnsController extends BaseController {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Name zone = Name.fromString("we.bstly.de.");
|
Name zone = Name.fromString("we.bstly.de.");
|
||||||
Name host = Name.fromString(name, zone);
|
Name host = Name.fromString(name.toLowerCase(), zone);
|
||||||
Update update = new Update(zone);
|
Update update = new Update(zone);
|
||||||
if (ip.isPresent()) {
|
if (ip.isPresent()) {
|
||||||
update.replace(host, Type.A, 300, ip.get());
|
update.replace(host, Type.A, 300, ip.get());
|
||||||
@ -104,7 +104,7 @@ public class DyndnsController extends BaseController {
|
|||||||
|
|
||||||
Message response = res.send(update);
|
Message response = res.send(update);
|
||||||
|
|
||||||
logger.debug("\nDynDNS for " + name + "with\nIP:\t" + ip.orElse("-") + "\nIPV6:\t" + ipv6.orElse("-") + "\n\n" +
|
logger.debug("\nDynDNS for '" + name + "' with\nIP:\t" + ip.orElse("-") + "\nIPV6:\t" + ipv6.orElse("-") + "\n\n" +
|
||||||
response.toString());
|
response.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user