Fix bashio installation script and symlink creation

This commit is contained in:
Alexandre
2026-01-29 11:19:04 +01:00
committed by GitHub
parent 7d650907c1
commit 7da8699791

View File

@@ -229,17 +229,14 @@ for files in "/etc/services.d" "/etc/cont-init.d"; do
if ! ls $files 1> /dev/null 2>&1; then continue; fi
# Bashio
if grep -q -rnw "$files/" -e 'bashio' && [ ! -f "/usr/bin/bashio.real" ]; then
if grep -q -rnw "$files/" -e 'bashio' && [ ! -f "/usr/bin/bashio" ]; then
[ "$VERBOSE" = true ] && echo "install bashio"
BASHIO_VERSION="latest"
mkdir -p /tmp/bashio
BASHIO_TAG="$(curl -fsSL "https://api.github.com/repos/hassio-addons/bashio/releases/${BASHIO_VERSION}" \
| awk -F '\"' '/tag_name/{print $4; exit}')"
curl -fsSL "https://github.com/hassio-addons/bashio/archive/${BASHIO_TAG}.tar.gz" \
| tar -xzf - --strip 1 -C /tmp/bashio
BASHIO_TAG="$(curl -f -L -s -S "https://api.github.com/repos/hassio-addons/bashio/releases/${BASHIO_VERSION}" | awk -F '\"' '/tag_name/{print $4; exit}')"
curl -f -L -s -S "https://github.com/hassio-addons/bashio/archive/${BASHIO_TAG}.tar.gz" | tar -xzf - --strip 1 -C /tmp/bashio
mv /tmp/bashio/lib /usr/lib/bashio
mv /tmp/bashio/bashio /usr/bin/bashio.real
chmod +x /usr/bin/bashio.real
ln -s /usr/lib/bashio/bashio /usr/bin/bashio.real
rm -rf /tmp/bashio
fi