Skip to content

Commit

Permalink
Fetch config from API (#82)
Browse files Browse the repository at this point in the history
Co-authored-by: Franck Nijhof <git@frenck.dev>
  • Loading branch information
pvizeli and frenck committed Nov 1, 2021
1 parent ca45138 commit 555dce6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/bashio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ source "${__BASHIO_LIB_DIR}/const.sh"
# Defaults
declare __BASHIO_SUPERVISOR_API=${SUPERVISOR_API:-${__BASHIO_DEFAULT_SUPERVISOR_API}}
declare __BASHIO_SUPERVISOR_TOKEN=${SUPERVISOR_TOKEN:-${__BASHIO_DEFAULT_SUPERVISOR_TOKEN}}
declare __BASHIO_ADDON_CONFIG=${ADDON_CONFIG:-${__BASHIO_DEFAULT_ADDON_CONFIG}}
declare __BASHIO_LOG_LEVEL=${LOG_LEVEL:-${__BASHIO_DEFAULT_LOG_LEVEL}}
declare __BASHIO_LOG_FORMAT=${LOG_FORMAT:-${__BASHIO_DEFAULT_LOG_FORMAT}}
declare __BASHIO_LOG_TIMESTAMP=${LOG_TIMESTAMP:-${__BASHIO_DEFAULT_LOG_TIMESTAMP}}
Expand Down
3 changes: 2 additions & 1 deletion lib/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ function bashio::config() {
end
QUERY

result=$(bashio::jq "${__BASHIO_ADDON_CONFIG}" "${query}")
options=$(bashio::addon.options)
result=$(bashio::jq "${options}" "${query}")

printf "%s" "${result}"
return "${__BASHIO_EXIT_OK}"
Expand Down
1 change: 0 additions & 1 deletion lib/const.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# ==============================================================================

# Defaults
readonly __BASHIO_DEFAULT_ADDON_CONFIG="/data/options.json"
readonly __BASHIO_DEFAULT_CACHE_DIR="/tmp/.bashio"
readonly __BASHIO_DEFAULT_HIBP_ENDPOINT="https://api.pwnedpasswords.com/range"
readonly __BASHIO_DEFAULT_LOG_FORMAT="[{TIMESTAMP}] {LEVEL}: {MESSAGE}"
Expand Down

0 comments on commit 555dce6

Please sign in to comment.