Skip to content

Commit

Permalink
add another glooko options
Browse files Browse the repository at this point in the history
  • Loading branch information
i-cz authored Mar 9, 2024
1 parent 135d9b6 commit 3fb4856
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nightscout/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"connect_link_up_region": "EU",
"connect_glooko_email": "",
"connect_glooko_password": "",
"connect_glooko_env": "eu",
"connect_glooko_server": "eu.api.glooko.com",
"connect_glooko_timezone_offset": "1",
"plugins": [
"careportal",
"boluscalc",
Expand Down Expand Up @@ -68,6 +71,9 @@
"connect_link_up_region": "str",
"connect_glooko_email": "str",
"connect_glooko_password": "str",
"connect_glooko_env": "str",
"connect_glooko_server": "str",
"connect_glooko_timezone_offset": "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
7 changes: 7 additions & 0 deletions nightscout/rootfs/etc/cont-init.d/nightscout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ readonly connect_link_up_server=$(bashio::config 'connect_link_up_server')
readonly connect_link_up_region=$(bashio::config 'connect_link_up_region')
readonly connect_glooko_email=$(bashio::config 'connect_glooko_email')
readonly connect_glooko_password=$(bashio::config 'connect_glooko_password')
readonly connect_glooko_env=$(bashio::config 'connect_glooko_env')
readonly connect_glooko_server=$(bashio::config 'connect_glooko_server')
readonly connect_glooko_timezone_offset=$(bashio::config 'connect_glooko_timezone_offset')



bashio::log.info "Setting up API KEY: ${api_key}"
Expand All @@ -26,3 +30,6 @@ export CONNECT_LINK_UP_SERVER="${connect_link_up_server}"
export CONNECT_LINK_UP_REGION="${connect_link_up_region}"
export CONNECT_GLOOKO_EMAIL="${connect_glooko_email}"
export CONNECT_GLOOKO_PASSWORD="${connect_glooko_password}"
export CONNECT_GLOOKO_ENV="${connect_glooko_env}"
export CONNECT_GLOOKO_SERVER="${connect_glooko_server}"
export CONNECT_GLOOKO_TIMEZONE_OFFSET="${connect_glooko_timezone_offset}"
9 changes: 9 additions & 0 deletions nightscout/rootfs/etc/services.d/nightscout/run
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ readonly connect_glooko_email=$(bashio::config 'connect_glooko_email')
bashio::log.debug "Setting up CONNECT_GLOOKO_EMAIL: ${connect_glooko_email}"
readonly connect_glooko_password=$(bashio::config 'connect_glooko_password')
bashio::log.debug "Setting up CONNECT_GLOOKO_PASSWORD: ${connect_glooko_password}"
readonly connect_glooko_env=$(bashio::config 'connect_glooko_env')
bashio::log.debug "Setting up CONNECT_GLOOKO_ENV: ${connect_glooko_env}"
readonly connect_glooko_server=$(bashio::config 'connect_glooko_server')
bashio::log.debug "Setting up CONNECT_GLOOKO_SERVER: ${connect_glooko_server}"
readonly connect_glooko_timezone_offset=$(bashio::config 'connect_glooko_timezone_offset')
bashio::log.debug "Setting up CONNECT_GLOOKO_TIMEZONE_OFFSET: ${connect_glooko_timezone_offset}"


export API_SECRET="${api_key}"
Expand All @@ -46,6 +52,9 @@ export CONNECT_LINK_UP_SERVER="${connect_link_up_server}"
export CONNECT_LINK_UP_REGION="${connect_link_up_region}"
export CONNECT_GLOOKO_EMAIL="${connect_glooko_email}"
export CONNECT_GLOOKO_PASSWORD="${connect_glooko_password}"
export CONNECT_GLOOKO_ENV="${connect_glooko_env}"
export CONNECT_GLOOKO_SERVER="${connect_glooko_server}"
export CONNECT_GLOOKO_TIMEZONE_OFFSET="${connect_glooko_timezone_offset}"

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

0 comments on commit 3fb4856

Please sign in to comment.