mirror of
https://codeberg.org/privacy1st/netcup-dns
synced 2024-12-22 23:36:04 +01:00
docs: add usage
This commit is contained in:
parent
cebca53cb7
commit
9774045dcf
22
README.md
22
README.md
@ -22,6 +22,28 @@ For each netcup customer, create a `.json` configuration file inside `/etc/netcu
|
|||||||
|
|
||||||
There is an [example configuration](cfg/example.json).
|
There is an [example configuration](cfg/example.json).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
usage: netcup-dns [-h] [--config-directory CFG_DIR]
|
||||||
|
[--cache-directory CACHE_DIR]
|
||||||
|
[--cache-validity-seconds CACHE_VALIDITY_SECONDS]
|
||||||
|
|
||||||
|
Update DNS A/AAAA records with your current external IP address using the
|
||||||
|
netcup DNS API.
|
||||||
|
|
||||||
|
options:
|
||||||
|
-h, --help show this help message and exit
|
||||||
|
--config-directory CFG_DIR
|
||||||
|
Path to directory where `.json` config files reside.
|
||||||
|
--cache-directory CACHE_DIR
|
||||||
|
Path to cache directory. Retrieved and updated DNS
|
||||||
|
records are cached there.
|
||||||
|
--cache-validity-seconds CACHE_VALIDITY_SECONDS
|
||||||
|
Value in seconds for how long cached DNS records are
|
||||||
|
valid. Set to `0` to disable caching.
|
||||||
|
```
|
||||||
|
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
Alternative external IP detection:
|
Alternative external IP detection:
|
||||||
|
@ -57,7 +57,8 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description='Update DNS A/AAAA records with your current external IP address'
|
parser = argparse.ArgumentParser(prog='netcup-dns',
|
||||||
|
description='Update DNS A/AAAA records with your current external IP address'
|
||||||
' using the netcup DNS API.')
|
' using the netcup DNS API.')
|
||||||
parser.add_argument('--config-directory',
|
parser.add_argument('--config-directory',
|
||||||
help='Path to directory where `.json` config files reside.',
|
help='Path to directory where `.json` config files reside.',
|
||||||
@ -65,7 +66,7 @@ def parse_args():
|
|||||||
default=Path('/etc/netcup-dns'),
|
default=Path('/etc/netcup-dns'),
|
||||||
type=Path)
|
type=Path)
|
||||||
parser.add_argument('--cache-directory',
|
parser.add_argument('--cache-directory',
|
||||||
help='Path to cache directory. Retrieved/Set DNS records are cached there.',
|
help='Path to cache directory. Retrieved and updated DNS records are cached there.',
|
||||||
dest='cache_dir',
|
dest='cache_dir',
|
||||||
default=Path.home().joinpath('.netcup-dns/cache'),
|
default=Path.home().joinpath('.netcup-dns/cache'),
|
||||||
type=Path)
|
type=Path)
|
||||||
|
Loading…
Reference in New Issue
Block a user