api: configure ccujack connection via established config mechanism

This commit is contained in:
lilly 2026-05-15 08:36:49 +02:00
commit f72f830b36
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
3 changed files with 21 additions and 2 deletions

View file

@ -46,6 +46,24 @@ def main():
default=os.environ.get("DOORIS_SERVE_STATIC", None),
help="In addition to the API functionality, serve static files from this path",
)
argp.add_argument(
"--ccujack-url",
required=False,
default=os.environ.get("DOORIS_CCUJACK_URL", "https://hmdooris-ccu.ccchh.net:2122"),
help="The URL under which a CCUJACK instance is hosted that actually operates the locks",
)
argp.add_argument(
"--ccujack-user",
required="DOORIS_CCUJACK_USER" not in os.environ,
default=os.environ.get("DOORIS_CCUJACK_USER", None),
help="The username used to authenticate against the CCUJACK",
)
argp.add_argument(
"--ccujack-password",
required="DOORIS_CCUJACK_PASSWORD" not in os.environ,
default=os.environ.get("DOORIS_CCUJACK_PASSWORD", None),
help="The password used to authenticate against the CCUJACK"
)
args = argp.parse_args()
app_config.set(args)