Skip to content

Commit

Permalink
install: ignore "apt-get update" errors (#915)
Browse files Browse the repository at this point in the history
On some platforms, like UDM, the APT configuration may be broken beyond
despair (see #830 or #909). We don't really care about dependencies as
we don't have any. Just ignore the error. APT will still update NextDNS
repository.
  • Loading branch information
vincentbernat committed Mar 3, 2024
1 parent de66703 commit 00d697a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ install_deb() {
(dpkg --compare-versions $(dpkg-query --showformat='${Version}' --show apt) ge 1.1 ||
asroot ln -s /etc/apt/keyrings/nextdns.gpg /etc/apt/trusted.gpg.d/.) &&
(test "$OS" = "debian" && asroot apt-get -y install apt-transport-https || true) &&
asroot apt-get update &&
(asroot apt-get update || true) &&
asroot apt-get install -y nextdns
}

Expand All @@ -317,7 +317,7 @@ install_deb_keyring() {

upgrade_deb() {
install_deb_keyring &&
asroot apt-get update &&
(asroot apt-get update || true) &&
asroot apt-get install -y nextdns
}

Expand Down Expand Up @@ -496,7 +496,7 @@ ubios_install_source() {
podman exec unifi-os apt-get install -y gnupg1 curl
podman exec unifi-os mkdir -p /etc/apt/keyrings/
podman exec unifi-os curl -sfL https://repo.nextdns.io/nextdns.gpg -o /etc/apt/keyrings/nextdns.gpg
podman exec unifi-os apt-get update -o Dir::Etc::sourcelist="sources.list.d/nextdns.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
podman exec unifi-os apt-get update -o Dir::Etc::sourcelist="sources.list.d/nextdns.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" || true
}

install_ubios() {
Expand Down

0 comments on commit 00d697a

Please sign in to comment.