mirror of
https://github.com/bashclub/zamba-lxc-toolbox
synced 2026-02-18 15:36:20 +00:00
fix gpg keys
This commit is contained in:
@@ -8,4 +8,4 @@
|
|||||||
# This file contains the project constants on container level
|
# This file contains the project constants on container level
|
||||||
|
|
||||||
# Define your (administrative) tools, you always want to have installed into your LXC container
|
# Define your (administrative) tools, you always want to have installed into your LXC container
|
||||||
LXC_TOOLSET_BASE="sudo lsb-release curl dirmngr git gnupg2 apt-transport-https wget ssl-cert tmux"
|
LXC_TOOLSET_BASE="sudo lsb-release curl dirmngr git gpg gnupg2 apt-transport-https wget ssl-cert tmux"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ EOF
|
|||||||
apt_repo() {
|
apt_repo() {
|
||||||
apt_name=$1
|
apt_name=$1
|
||||||
apt_key_url=$2
|
apt_key_url=$2
|
||||||
apt_key_path=/usr/share/keyrings/${apt_name}.gpg
|
apt_key_path=/usr/share/keyrings/${apt_name}-archive-keyring.gpg
|
||||||
apt_repo_url=$3
|
apt_repo_url=$3
|
||||||
apt_suites=$4
|
apt_suites=$4
|
||||||
apt_components=$5
|
apt_components=$5
|
||||||
@@ -36,6 +36,7 @@ apt_repo() {
|
|||||||
echo "🔍 Format erkannt: ASCII. Konvertiere den Schlüssel..."
|
echo "🔍 Format erkannt: ASCII. Konvertiere den Schlüssel..."
|
||||||
# Wenn es ASCII ist, konvertiere es mit --dearmor
|
# Wenn es ASCII ist, konvertiere es mit --dearmor
|
||||||
if sudo gpg --dearmor -o "${apt_key_path}" "${tmp_key_file}"; then
|
if sudo gpg --dearmor -o "${apt_key_path}" "${tmp_key_file}"; then
|
||||||
|
chmod 644 ${apt_key_path}
|
||||||
echo "✅ Schlüssel erfolgreich nach ${apt_key_path} konvertiert."
|
echo "✅ Schlüssel erfolgreich nach ${apt_key_path} konvertiert."
|
||||||
else
|
else
|
||||||
echo "❌ Fehler bei der Konvertierung des ASCII-Schlüssels."
|
echo "❌ Fehler bei der Konvertierung des ASCII-Schlüssels."
|
||||||
@@ -47,6 +48,7 @@ apt_repo() {
|
|||||||
# Wenn es kein ASCII ist, gehen wir von Binär aus und verschieben die Datei
|
# Wenn es kein ASCII ist, gehen wir von Binär aus und verschieben die Datei
|
||||||
if sudo mv "${tmp_key_file}" "${apt_key_path}"; then
|
if sudo mv "${tmp_key_file}" "${apt_key_path}"; then
|
||||||
echo "✅ Schlüssel erfolgreich nach ${apt_key_path} kopiert."
|
echo "✅ Schlüssel erfolgreich nach ${apt_key_path} kopiert."
|
||||||
|
chmod 644 ${apt_key_path}
|
||||||
else
|
else
|
||||||
echo "❌ Fehler beim Kopieren des binären Schlüssels."
|
echo "❌ Fehler beim Kopieren des binären Schlüssels."
|
||||||
rm -f "${tmp_key_file}"
|
rm -f "${tmp_key_file}"
|
||||||
|
|||||||
Reference in New Issue
Block a user