Skip to content

Commit

Permalink
fix apt-get update to work if repo broken
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi committed Apr 9, 2024
1 parent 1176295 commit d1cc813
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ install_evcc() {
if ! add_keys "$repokeyurl" "$keyName"; then echo "FAILED (add EVCC repo key)"; return 1; fi
( echo "deb ${repotxt}"; echo "deb-src ${repotxt}" ) > $repo
echo -n "$(timestamp) [openHABian] Installing EVCC... "
if ! cond_redirect apt update; then echo "FAILED (update apt lists)"; return 1; fi
cond_redirect apt update -o DPkg::Lock::Timeout="$APTTIMEOUT"
if ! cond_redirect apt install -y evcc; then echo "FAILED (EVCC package installation)"; return 1; fi

mkdir "$svcdir"
Expand Down
4 changes: 3 additions & 1 deletion functions/vpn.bash
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,14 @@ install_tailscale() {
fi

echo "$(timestamp) [openHABian] Installing tailscale VPN... "
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
# Add tailscale's GPG key
add_keys "https://pkgs.tailscale.com/stable/raspbian/${myRelease,,}.noarmor.gpg" "$keyName"
# Add the tailscale repository
#echo "deb [signed-by=/usr/share/keyrings/${keyName}.gpg] https://pkgs.tailscale.com/stable/raspbian ${myRelease,,} main" > /etc/apt/sources.list.d/tailscale.list
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
if ! cond_redirect apt-get update; then echo "FAILED (update apt lists)"; return 1; fi
cond_redirect apt-get update -o DPkg::Lock::Timeout="$APTTIMEOUT"

# Install tailscale
if cond_redirect apt-get install --yes -o DPkg::Lock::Timeout="$APTTIMEOUT" tailscale; then echo "OK"; else echo "FAILED (install tailscale)"; return 1; fi
Expand Down

0 comments on commit d1cc813

Please sign in to comment.