diff --git a/.templates/ha_automatic_packages.sh b/.templates/ha_automatic_packages.sh index 1aea0f50c..5841863e7 100755 --- a/.templates/ha_automatic_packages.sh +++ b/.templates/ha_automatic_packages.sh @@ -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