From 868080b07a6b55356d13266ec4bf6e6fff0b120c Mon Sep 17 00:00:00 2001 From: Skinoz <38363543+Skinoz@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:31:22 +0100 Subject: [PATCH] Add /etc/apt/keyrings if not exist (#124) * Add install /etc/apt/keyrings file before add gpg key --- minione | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/minione b/minione index bc72989..367ff98 100755 --- a/minione +++ b/minione @@ -765,6 +765,11 @@ EOT if [[ $1 = 'purge' ]]; then rm -f /etc/apt/sources.list.d/opennebula.list else + # Check if /etc/apt/keyrings directory exists, if not, create it + if [ ! -d /etc/apt/keyrings ]; then + install -m 0755 -d /etc/apt/keyrings + fi + (wget -q -O- https://downloads.opennebula.io/repo/"${REPO_KEY}" | gpg --dearmor --yes --output /etc/apt/keyrings/opennebula.gpg) || return 1 echo "deb [signed-by=/etc/apt/keyrings/opennebula.gpg] ${REPO_BASE}/${DISTNAME}/${DISTVER} stable opennebula" \