From e4b3abd01d207c9ec7dff50ba76d5b3839c1372d Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Mon, 30 Oct 2023 16:09:19 +0100 Subject: [PATCH] rename ENV var --- README.md | 14 +++++++------- ucapi/api.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9e4229d..402b6f0 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ More examples will be published. Certain features can be configured by environment variables: -| Variable | Values | Description | -|------------------------------------|------------------|----------------------------------------------------------------------------------------------------------------------| -| UC_CONFIG_HOME | _directory path_ | Configuration directory to save the user configuration from the driver setup.
Default: $HOME or current directory | -| UC_INTEGRATION_INTERFACE | _address_ | Listening interface for WebSocket server.
Default: `0.0.0.0` | -| UC_INTEGRATION_HTTP_PORT | _number_ | WebSocket listening port.
Default: `port` field in driver metadata json file, if not specified: `9090` | -| UC_INTEGRATION_MDNS_LOCAL_HOSTNAME | _hostname_ | Published local hostname in mDNS service announcement.
Default: _short hostname_ with `.local` domain. | -| UC_DISABLE_MDNS_PUBLISH | `true` / `false` | Disables mDNS service advertisement.
Default: `false` | +| Variable | Values | Description | +|--------------------------|------------------|----------------------------------------------------------------------------------------------------------------------| +| UC_CONFIG_HOME | _directory path_ | Configuration directory to save the user configuration from the driver setup.
Default: $HOME or current directory | +| UC_INTEGRATION_INTERFACE | _address_ | Listening interface for WebSocket server.
Default: `0.0.0.0` | +| UC_INTEGRATION_HTTP_PORT | _number_ | WebSocket listening port.
Default: `port` field in driver metadata json file, if not specified: `9090` | +| UC_MDNS_LOCAL_HOSTNAME | _hostname_ | Published local hostname in mDNS service announcement.
Default: _short hostname_ with `.local` domain. | +| UC_DISABLE_MDNS_PUBLISH | `true` / `false` | Disables mDNS service advertisement.
Default: `false` | ## Versioning diff --git a/ucapi/api.py b/ucapi/api.py index 00cf7b9..666edf7 100644 --- a/ucapi/api.py +++ b/ucapi/api.py @@ -704,7 +704,7 @@ def local_hostname() -> str: """ Get the local hostname for mDNS publishing. - Overridable by environment variable ``UC_INTEGRATION_MDNS_LOCAL_HOSTNAME``. + Overridable by environment variable ``UC_MDNS_LOCAL_HOSTNAME``. :return: the local hostname """ @@ -712,4 +712,4 @@ def local_hostname() -> str: # Useful on macOS where it's broken for several years: local hostname keeps on changing! # https://apple.stackexchange.com/questions/189350/my-macs-hostname-keeps-adding-a-2-to-the-end - return os.getenv("UC_INTEGRATION_MDNS_LOCAL_HOSTNAME") or f"{socket.gethostname().split('.', 1)[0]}.local." + return os.getenv("UC_MDNS_LOCAL_HOSTNAME") or f"{socket.gethostname().split('.', 1)[0]}.local."