diff --git a/.templates/ha_entrypoint.sh b/.templates/ha_entrypoint.sh index 7621af626..cf2f749a2 100755 --- a/.templates/ha_entrypoint.sh +++ b/.templates/ha_entrypoint.sh @@ -2,6 +2,16 @@ # shellcheck shell=bash set -euo pipefail +###################################### +# Accept running without supervisor # +###################################### + +if ! bashio::supervisor.ping 2> /dev/null; then + bashio::log.warning "Using standalone mode to run bashio commands without HA supervisor" + mv /usr/local/lib/bashio-standalone.sh /usr/bin/bashio + chmod +x /usr/bin/bashio +fi + ########################################## # Detect if this is PID1 (main process) # ##########################################