mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-09-26 21:01:12 +08:00
granular debug options
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
Reference in New Issue
Block a user