diff --git a/.templates/ha_automatic_packages.sh b/.templates/ha_automatic_packages.sh index 852f02c73..23c3d2fd1 100755 --- a/.templates/ha_automatic_packages.sh +++ b/.templates/ha_automatic_packages.sh @@ -183,6 +183,12 @@ done [ "$VERBOSE" = true ] && echo "installing packages $PACKAGES" if [ "$PACKMANAGER" = "apt" ]; then apt-get update > /dev/null; fi if [ "$PACKMANAGER" = "pacman" ]; then pacman -Sy > /dev/null; fi +if [ "$PACKMANAGER" = "apk" ] && [ -f /etc/apk/repositories ] && ! grep -q "community" /etc/apk/repositories; then + ALPINE_VER=$(cat /etc/alpine-release 2>/dev/null | cut -d. -f1,2) + if [ -n "$ALPINE_VER" ]; then + echo "https://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VER}/community" >> /etc/apk/repositories + fi +fi # Install apps one by one to allow failures # shellcheck disable=SC2086