Skip to content

Commit

Permalink
add region
Browse files Browse the repository at this point in the history
  • Loading branch information
i-cz authored Jan 26, 2024
1 parent 454396f commit 4c9b498
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions nightscout/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"connect_link_up_username": "",
"connect_link_up_password": "",
"connect_link_up_server": "api-eu.libreview.io",
"connect_link_up_region": "EU",
"plugins": [
"careportal",
"boluscalc",
Expand Down Expand Up @@ -62,6 +63,7 @@
"connect_link_up_username": "str",
"connect_link_up_password": "str",
"connect_link_up_server": "str",
"connect_link_up_region": "str",
"auth_default_roles": "list(admin|denied|status-only|readable|careportal|devicestatus-upload|activity)?",
"theme": "list(default|colors|colorblindfriendly)",
"import_config_url": "str?",
Expand Down
2 changes: 2 additions & 0 deletions nightscout/rootfs/etc/cont-init.d/nightscout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ readonly connect_source=$(bashio::config 'connect_source')
readonly connect_link_up_username=$(bashio::config 'connect_link_up_username')
readonly connect_link_up_password=$(bashio::config 'connect_link_up_password')
readonly connect_link_up_server=$(bashio::config 'connect_link_up_server')
readonly connect_link_up_region=$(bashio::config 'connect_link_up_region')

bashio::log.info "Setting up API KEY: ${api_key}"
export API_SECRET="${api_key}"
Expand All @@ -19,3 +20,4 @@ export CONNECT_SOURCE="${connect_source}"
export CONNECT_LINK_UP_USERNAME="${connect_link_up_username}"
export CONNECT_LINK_UP_PASSWORD="${connect_link_up_password}"
export CONNECT_LINK_UP_SERVER="${connect_link_up_server}"
export CONNECT_LINK_UP_REGION="${connect_link_up_region}"
7 changes: 5 additions & 2 deletions nightscout/rootfs/etc/services.d/nightscout/run
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ bashio::log.debug "Setting up CONNECT_SOURCE: ${connect_source}"
readonly connect_link_up_username=$(bashio::config 'connect_link_up_username')
bashio::log.debug "Setting up CONNECT_LINK_UP_USERNAME: ${connect_link_up_username}"
readonly connect_link_up_password=$(bashio::config 'connect_link_up_password')
bashio::log.debug "Setting up CONNECT_LINK_UP_PASSWORD: 'connect_link_up_password'"
bashio::log.debug "Setting up CONNECT_LINK_UP_PASSWORD: ${connect_link_up_password}"
readonly connect_link_up_server=$(bashio::config 'connect_link_up_server')
bashio::log.debug "Setting up CONNECT_LINK_UP_SERVER: 'connect_link_up_server'"
bashio::log.debug "Setting up CONNECT_LINK_UP_SERVER: ${connect_link_up_server}"
readonly connect_link_up_region=$(bashio::config 'connect_link_up_region')
bashio::log.debug "Setting up CONNECT_LINK_UP_REGION: ${connect_link_up_region}"

export API_SECRET="${api_key}"
export HOSTNAME="127.0.0.1"
Expand All @@ -36,6 +38,7 @@ export CONNECT_SOURCE="${connect_source}"
export CONNECT_LINK_UP_USERNAME="${connect_link_up_username}"
export CONNECT_LINK_UP_PASSWORD="${connect_link_up_password}"
export CONNECT_LINK_UP_SERVER="${connect_link_up_server}"
export CONNECT_LINK_UP_REGION="${connect_link_up_region}"

if bashio::config.has_value 'auth_default_roles'; then
readonly auth_default_roles=$(bashio::config 'auth_default_roles')
Expand Down

0 comments on commit 4c9b498

Please sign in to comment.