diff --git a/README.md b/README.md index 15796ec..0dd923b 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,11 @@ certbot certonly -c wildcard-ini ``` +### use as basiy dynamic dns +``` +./update-record.py -p -m update -c conf.cfg -t 300 -r AAAA device.example.com +``` + ## help ``` usage: update-record.py [-h] -r type [--delete] [-u] [-c path] [-t TTL] diff --git a/update-record.py b/update-record.py index eb83a2e..bffd72a 100755 --- a/update-record.py +++ b/update-record.py @@ -132,7 +132,7 @@ parser.add_argument('content', metavar='content', nargs='?', default=None, help='ip or string to fill/update into subdomain domain entry') parser.add_argument('-r', '--record-type', metavar='type', required=True, choices=['A', 'AAAA', 'TXT', 'CNAME', 'TLSA'], help='record type (A, AAAA, TXT, CNAME, TLSA)') parser.add_argument('-m', '--mode', metavar='mode', required=True, choices=['create', 'update', 'delete'], help='operation mode (create, update, delete)\nupdate:update all existing records if one exists, or create if not existing\ndelete: delete existing record with given content, or delete all records if no content is given') - parser.add_argument('-p', '--public-ip', action='store_true', required=False, help='insert public ip. Use A for ip4 an AAAA for ipv6') + parser.add_argument('-p', '--public-ip', action='store_true', required=False, help='insert public ip. Use -r A for ip4 an -r AAAA for ipv6') parser.add_argument('-c', '--config_file', metavar='path', default='./conf.cfg', help='path to configuration file') parser.add_argument('-t', '--ttl', default=3600, type=int, help='TTL (time to live) of the nameserver record in seconds (default 3600)') parser.add_argument('-s', '--config_section', metavar='section', default='live', choices=['live', 'ote'], help='configuration section (live, ote) default: live')