Browse Source

Added info about local ip on -c option. Corrected and added to output of update part.

master
Rune Olsen 1 year ago
parent
commit
cbc176589b
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      py-dyndns.py

+ 4
- 2
py-dyndns.py View File

@@ -59,7 +59,7 @@ def runupdate():
if remoteIP4 != local_ip4:
response = updateip(local_ip4, value)
if '200' in response:
logging.info('Success! Domain %s updated with IP: %s', section,remoteIP4)
logging.info('Success! Domain %s updated with IP: %s (old IP: %s)', section,local_ip4,remoteIP4)
else:
logging.error('Failure! '+response)
else:
@@ -79,6 +79,8 @@ def listdomains():


def listcurrent():
print('Current local IP :'+local_ip4)
print('=======================================')
for section in config.sections():
if not config.has_option(section, 'subdomainid'):
continue
@@ -129,4 +131,4 @@ elif args['current']:
elif args['add']:
addnewdomin(args)
else:
runupdate()
runupdate()

Loading…
Cancel
Save