set_pbs_repos.sh hinzugefügt

This commit is contained in:
2026-01-23 22:20:16 +01:00
parent 0ab4c787b9
commit ea120fc642

68
set_pbs_repos.sh Normal file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
# =====================================================
# Proxmox Backup Server Repository Setup (No-Subscription)
# Debian 13 (trixie) | deb822 (.sources)
# Enterprise -> No-Subscription
# =====================================================
# Farben / Layout
BOLD="\033[1m"
GREEN="\033[32m"
CYAN="\033[36m"
RESET="\033[0m"
INDENT=" "
# Root-Check
if [[ $EUID -ne 0 ]]; then
echo -e "${INDENT}${BOLD}Bitte als Root ausführen!${RESET}"
exit 1
fi
echo -e "${BOLD}${CYAN}"
echo -e "${INDENT}=============================================="
echo -e "${INDENT} Proxmox Backup Server Repository Setup"
echo -e "${INDENT} No-Subscription | deb822 Standard"
echo -e "${INDENT}=============================================="
echo -e "${RESET}"
# Proxmox Keyring prüfen
KEYRING="/usr/share/keyrings/proxmox-archive-keyring.gpg"
if [[ ! -f "$KEYRING" ]]; then
echo -e "${INDENT}==> Proxmox Keyring fehlt installiere..."
apt update >/dev/null
apt install -y proxmox-archive-keyring
fi
# -----------------------------------------------------
# PBS Repos
# -----------------------------------------------------
# pbs-enterprise.disabled
cat <<EOF > /etc/apt/sources.list.d/pbs-enterprise.sources
Types: deb
URIs: https://enterprise.proxmox.com/debian/pbs
Suites: trixie
Components: pbs-enterprise
Signed-By: ${KEYRING}
Enabled: false
EOF
# pbs-no-subscription.enabled
cat <<EOF > /etc/apt/sources.list.d/proxmox.sources
Types: deb
URIs: http://download.proxmox.com/debian/pbs/
Suites: trixie
Components: pbs-no-subscription
Signed-By: ${KEYRING}
Enabled: true
EOF
# -----------------------------------------------------
# APT Update
# -----------------------------------------------------
echo -e "${INDENT}==> APT Update..."
apt update && apt dist-upgrade -y
echo
echo -e "${GREEN}${INDENT}✔ PBS Repositories erfolgreich eingerichtet!${RESET}"
echo -e "${INDENT}PBS nutzt jetzt No-Subscription Repos."