From e83c19c846a3bb05c673be9bccf01de3ca5b6566 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Wed, 5 Mar 2014 22:53:07 +0100 Subject: [PATCH] zone is now a configuration variable --- cgi-bin/dyndns.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cgi-bin/dyndns.py b/cgi-bin/dyndns.py index 6087beb..f9919dd 100755 --- a/cgi-bin/dyndns.py +++ b/cgi-bin/dyndns.py @@ -12,6 +12,7 @@ import ipaddr # Configuration PASSWORD = 'hygCithOrs5' +ZONE = '.dyn.colgarra.priv.at' # Just for debugging: @@ -27,7 +28,9 @@ hostname = fields.getvalue('hostname') myip = fields.getvalue('myip') # Strip zone -hostname = re.sub('\.dyn\.colgarra\.priv\.at\s*$', '', hostname) +hostname = hostname.strip() +if hostname.endswith(ZONE): + hostname = hostname[:-len(ZONE)] try: # check username -- 2.39.5