From d02f1be46ac384aa1937971092394562533e9456 Mon Sep 17 00:00:00 2001 From: Andrew Lytvynov Date: Mon, 29 Apr 2024 12:23:46 -0700 Subject: [PATCH] scripts/installer.sh: enable Alpine community repo if needed (#11837) The tailscale package is in the community Alpine repo. Check if it's commented out in `/etc/apk/repositories` and run `setup-apkrepos -c -1` if it's not. Fixes #11263 Signed-off-by: Andrew Lytvynov --- scripts/installer.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/installer.sh b/scripts/installer.sh index 711db942b..f11e98242 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -527,6 +527,14 @@ main() { ;; apk) set -x + if ! grep -Eq '^http.*\/community$' /etc/apk/repositories; then + if type setup-apkrepos >/dev/null; then + $SUDO setup-apkrepos -c -1 + else + echo "installing tailscale requires the community repo to be enabled in /etc/apk/repositories" + exit 1 + fi + fi $SUDO apk add tailscale $SUDO rc-update add tailscale $SUDO rc-service tailscale start