mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 20:11:24 +00:00
19 lines
845 B
Bash
19 lines
845 B
Bash
#!/usr/bin/env bash
|
|
# ==============================================================================
|
|
# Community Hass.io Add-ons: Bashio
|
|
# Bashio is an bash function library for use with Hass.io add-ons.
|
|
#
|
|
# It contains a set of commonly used operations and can be used
|
|
# to be included in add-on scripts to reduce code duplication across add-ons.
|
|
# ==============================================================================
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Checks if we are currently running in debug mode, based on the log module.
|
|
# ------------------------------------------------------------------------------
|
|
bashio::debug() {
|
|
if [[ "${__BASHIO_LOG_LEVEL}" -lt "${__BASHIO_LOG_LEVEL_DEBUG}" ]]; then
|
|
return "${__BASHIO_EXIT_NOK}"
|
|
fi
|
|
|
|
return "${__BASHIO_EXIT_OK}"
|
|
}
|