Skip to content

Commit

Permalink
Add /etc/apt/keyrings if not exist (#124)
Browse files Browse the repository at this point in the history
* Add install /etc/apt/keyrings file before add gpg key
  • Loading branch information
Skinoz authored Feb 9, 2024
1 parent c5a98f4 commit 868080b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions minione
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 868080b

Please sign in to comment.