From a1d3345210e2770163cb40316182a57ccc7feb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Aleksandrovi=C4=8D=20Klimov?= Date: Fri, 20 Sep 2024 13:08:53 +0200 Subject: [PATCH] .deb: let user install icinga-archive-keyring package --- doc/02-Installation.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/02-Installation.md b/doc/02-Installation.md index 1e1d49bd4..a66f9f8c9 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -54,14 +54,18 @@ If you've already configured your OS to use the Icinga repository for installing ```bash apt-get update -apt-get -y install apt-transport-https wget gnupg +apt-get -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-get 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-get update @@ -73,14 +77,18 @@ apt-get update ```bash apt-get update -apt-get -y install apt-transport-https wget gnupg +apt-get -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+ubuntu$( + . /etc/os-release; echo "$VERSION_ID" +).deb" + +apt-get 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-get update