From cd49c3a288b0dc9a8ad746cb981d1a8e6c8f23b8 Mon Sep 17 00:00:00 2001 From: Tommy Miland Date: Fri, 4 Oct 2024 17:57:10 +0200 Subject: [PATCH] Update for Ubuntu 24 Docker - Update for Ubuntu 24 Docker --- README.md | 6 ++---- invidious_update.sh | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f78b6c6..08a1f0d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ If you're looking for a quick way to install, check out [Invidious-Installer](ht | Debian | Ubuntu | | ------ | ------ | -| [](https://raw.githubusercontent.com/tmiland/Invidious-Updater/master/img/Debian_12.png) | [](https://raw.githubusercontent.com/tmiland/Invidious-Updater/master/img/Ubuntu.png) +| [](https://raw.githubusercontent.com/tmiland/Invidious-Updater/master/img/Debian_12.png) | [](https://raw.githubusercontent.com/tmiland/Invidious-Updater/master/img/Ubuntu_24.png) | CentOS | Fedora | | ------ | ------ | @@ -61,10 +61,8 @@ Tested and working on: - [X] Tested extensively on Debian 9/10/11/12 - [X] Docker option tested and working -- [X] Tested on Ubuntu 16.04 +- [X] Tested on Ubuntu 16.04/18.10/24 - [X] Docker option tested, not working -- [X] Tested on Ubuntu 18.10 - - [X] Docker option tested and working - [X] Tested on CentOS 8 - [ ] Docker option tested and working - [X] Tested on Fedora 40 diff --git a/invidious_update.sh b/invidious_update.sh index ce18dd8..7371e08 100755 --- a/invidious_update.sh +++ b/invidious_update.sh @@ -982,6 +982,9 @@ install_docker() { if [[ $(lsb_release -si) == "Debian" || $(lsb_release -si) == "Ubuntu" || $(lsb_release -si) == "PureOS" ]]; then + CODENAME=$(lsb_release -cs) + DISTRO=$(lsb_release -si) + DISTRO_TO_LOWER="${DISTRO,}" #Install packages to allow apt to use a repository over HTTPS: ${SUDO} ${INSTALL} \ apt-transport-https \ @@ -992,7 +995,7 @@ install_docker() { # Add Docker’s official GPG key: curl -fsSLk https://download.docker.com/linux/debian/gpg | ${SUDO} gpg --dearmor -o /usr/share/keyrings/docker.gpg >/dev/null - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/$DISTRO_TO_LOWER $CODENAME stable" | ${SUDO} tee /etc/apt/sources.list.d/docker.list > /dev/null # Update the apt package index: ${SUDO} ${UPDATE} @@ -1002,19 +1005,19 @@ install_docker() { ${SUDO} docker run hello-world shopt -s nocasematch elif [[ $(lsb_release -si) == "LinuxMint" ]]; then - OS_CODENAME=$(lsb_release -cs) - case $OS_CODENAME in + CODENAME=$(lsb_release -cs) + case $CODENAME in wilma ) - OS_CODENAME=noble + CODENAME=noble ;; virginia|victoria|vera|Vanessa ) - OS_CODENAME=jammy + CODENAME=jammy ;; uma|ulyssa|ulyana ) - OS_CODENAME=focal + CODENAME=focal ;; faye ) - OS_CODENAME=bookworm + CODENAME=bookworm ;; esac #Install packages to allow apt to use a repository over HTTPS: @@ -1027,7 +1030,7 @@ install_docker() { # Add Docker’s official GPG key: curl -fsSLk https://download.docker.com/linux/ubuntu/gpg | ${SUDO} gpg --dearmor -o /usr/share/keyrings/docker.gpg >/dev/null - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $OS_CODENAME stable" | + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $CODENAME stable" | ${SUDO} tee /etc/apt/sources.list.d/docker.list > /dev/null # Update the apt package index: ${SUDO} ${UPDATE}