diff --git a/doc/02-Installation.md b/doc/02-Installation.md index e7e359aa9..f2c2ab30c 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -81,14 +81,18 @@ wget https://packages.icinga.com/centos/ICINGA-release.repo -O /etc/yum.repos.d/ ```bash apt update -apt -y install apt-transport-https wget gnupg +apt -y install apt-transport-https wget -wget -O - https://packages.icinga.com/icinga.key | apt-key add - +wget -O icinga-archive-keyring.deb "https://packages.icinga.com/icinga-archive-keyring_latest+debian$( + . /etc/os-release; echo "$VERSION_ID" +).deb" + +apt install ./icinga-archive-keyring.deb DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \ - echo "deb https://packages.icinga.com/debian icinga-${DIST} main" > \ + echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/debian icinga-${DIST} main" > \ /etc/apt/sources.list.d/${DIST}-icinga.list - echo "deb-src https://packages.icinga.com/debian icinga-${DIST} main" >> \ + echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/debian icinga-${DIST} main" >> \ /etc/apt/sources.list.d/${DIST}-icinga.list apt update @@ -147,14 +151,18 @@ zypper ref ```bash apt update -apt -y install apt-transport-https wget gnupg +apt -y install apt-transport-https wget + +wget -O icinga-archive-keyring.deb "https://packages.icinga.com/icinga-archive-keyring_latest+ubuntu$( + . /etc/os-release; echo "$VERSION_ID" +).deb" -wget -O - https://packages.icinga.com/icinga.key | apt-key add - +apt install ./icinga-archive-keyring.deb . /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \ - echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" > \ + echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \ /etc/apt/sources.list.d/${DIST}-icinga.list - echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \ + echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \ /etc/apt/sources.list.d/${DIST}-icinga.list apt update