projects
/
dyn-nsupdate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't hard-code the path to the python interpreter
[dyn-nsupdate.git]
/
client-scripts
/
dyn-ns-client
diff --git
a/client-scripts/dyn-ns-client
b/client-scripts/dyn-ns-client
index 6c030d10bb523ea16ce9a05f5f23a892affac40a..383c1150941dad94ce7f273b815f99738f2bf977 100755
(executable)
--- a/
client-scripts/dyn-ns-client
+++ b/
client-scripts/dyn-ns-client
@@
-1,4
+1,4
@@
-#!/usr/bin/python3
+#!/usr/bin/
env
python3
# Copyright (c) 2014, Ralf Jung <post@ralfj.de>
# All rights reserved.
#
# Copyright (c) 2014, Ralf Jung <post@ralfj.de>
# All rights reserved.
#
@@
-76,6
+76,7
@@
def getMyIPv6(config, verbose = False):
if verbose:
print("Local IPv6 detected to be",ip)
return ip
if verbose:
print("Local IPv6 detected to be",ip)
return ip
+ raise Exception("Unable to detect correct local IPv6 address")
return getMyIP("IPv6", config, methods={'local': local}, verbose=verbose)
def getCurIP(domain, family):
return getMyIP("IPv6", config, methods={'local': local}, verbose=verbose)
def getCurIP(domain, family):
@@
-104,7
+105,7
@@
def updateDomain(server, domain, ipv4, ipv6, password, verbose):
curIPv4 = getCurIPv4(domain)
curIPv6 = getCurIPv6(domain)
if verbose:
curIPv4 = getCurIPv4(domain)
curIPv6 = getCurIPv6(domain)
if verbose:
- print("Current status of domain {
0} is: IPv4 address '{1}', IPv6 address '{2
}'".format(domain, curIPv4, curIPv6))
+ print("Current status of domain {
} is: IPv4 address '{}', IPv6 address '{
}'".format(domain, curIPv4, curIPv6))
# check if there's something to do
needUpdate = (ipv4 is not None and curIPv4 != ipv4) or (ipv6 is not None and curIPv6 != ipv6)
# check if there's something to do
needUpdate = (ipv4 is not None and curIPv4 != ipv4) or (ipv6 is not None and curIPv6 != ipv6)