diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..56ac926 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +conf.cfg diff --git a/README.md b/README.md index 17e3a7a..9cac7ad 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ ## requirements +There mus be exist an uniqe combination of subdomain and record type! + A file `conf.cfg` with inwx settings must e exist in the repository root folder like: ``` [live] @@ -15,6 +17,7 @@ shared_secret = your_shared_secret ``` + ## example usage ### command line diff --git a/update-record.py b/update-record.py index 88bec3f..399a89c 100755 --- a/update-record.py +++ b/update-record.py @@ -52,7 +52,7 @@ records = ret['resData']['record'] for r in records: - if (r['name'] == args.domain): + if (r['name'] == args.domain and r['type'] == args.record_type): subId = r['id'] if (verbose): print(r) @@ -61,10 +61,6 @@ # end if # end for - if (verbose): - print('subdomain id: ' + str(subId)) - # end if - if (args.delete): if (subId >= 0): if (verbose):