granular debug options

This commit is contained in:
tsightler
2021-09-25 15:28:49 -04:00
parent a165fd7897
commit 000653e1bf
29 changed files with 149 additions and 129 deletions

View File

@@ -8,7 +8,7 @@
# for the detected environment.
# ==============================================================================
# Delay to keep logs messages from overlapping with s6 logs
# Short delay to keep log messages from overlapping with s6 logs
sleep .5
# If options.json exist we are running as addon
@@ -33,7 +33,8 @@ else
echo "-------------------------------------------------------"
fi
set +o nounset
if [ "${BRANCH}" = "latest" ] || [ "${BRANCH}" = "dev" ]; then
/app/ring-mqtt/scripts/update2branch.sh
if [ -v ${BRANCH} ]; then
if [ "${BRANCH}" = "latest" ] || [ "${BRANCH}" = "dev" ]; then
/app/ring-mqtt/scripts/update2branch.sh
fi
fi

View File

@@ -14,15 +14,21 @@ sleep .5
if [ -f /data/options.json ]; then
export RUNMODE=addon
export BRANCH=$(bashio::config "branch")
export DEBUG=$(bashio::config "debug")
else
export RUNMODE=docker
# If debug is not explicitly defined, use default
if [ ! -v DEBUG ]; then
export DEBUG="ring-*"
fi
fi
set +o nounset
if [ "${BRANCH}" = "latest" ] || [ "${BRANCH}" = "dev" ]; then
cd "/app/ring-mqtt-${BRANCH}"
else
cd /app/ring-mqtt
if [ -v BRANCH ]; then
if [ "${BRANCH}" = "latest" ] || [ "${BRANCH}" = "dev" ]; then
cd "/app/ring-mqtt-${BRANCH}"
else
cd /app/ring-mqtt
fi
fi
echo "-------------------------------------------------------"
@@ -100,4 +106,4 @@ if [ "${RUNMODE}" = "addon" ]; then
fi
echo "Running ring-mqtt..."
DEBUG=ring-* exec ./ring-mqtt.js
exec ./ring-mqtt.js