Used click's own environment variable handling
This commit is contained in:
parent
4e0cced632
commit
53ff70bbf3
1 changed files with 1 additions and 3 deletions
|
@ -63,13 +63,11 @@ def ddns_update(host, key, ip):
|
||||||
@click.option(
|
@click.option(
|
||||||
"--host",
|
"--host",
|
||||||
required=True,
|
required=True,
|
||||||
default=lambda: environ.get("DDNS_HOST", None),
|
|
||||||
help="The dns name to update",
|
help="The dns name to update",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--key",
|
"--key",
|
||||||
required=True,
|
required=True,
|
||||||
default=lambda: environ.get("DDNS_KEY", None),
|
|
||||||
help="The ddns authorization key",
|
help="The ddns authorization key",
|
||||||
)
|
)
|
||||||
def loop_ddns_update(host, key):
|
def loop_ddns_update(host, key):
|
||||||
|
@ -88,4 +86,4 @@ def loop_ddns_update(host, key):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
log.info("starting...")
|
log.info("starting...")
|
||||||
loop_ddns_update()
|
loop_ddns_update(auto_envvar_prefix="DDNS")
|
||||||
|
|
Loading…
Reference in a new issue