From 0329c13375bc7f22ffec29de776b82286be37a5f Mon Sep 17 00:00:00 2001 From: "manuel.maier" Date: Wed, 28 Jan 2026 00:11:29 +0100 Subject: [PATCH] set_pve_repos.sh aktualisiert --- set_pve_repos.sh | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/set_pve_repos.sh b/set_pve_repos.sh index 56d7d0c..9ff83fe 100644 --- a/set_pve_repos.sh +++ b/set_pve_repos.sh @@ -5,37 +5,40 @@ # Enterprise -> No-Subscription # ===================================================== -# Farben / Layout +# ---- Farben / Layout ---- BOLD="\033[1m" GREEN="\033[32m" CYAN="\033[36m" +YELLOW="\033[33m" +RED="\033[31m" RESET="\033[0m" INDENT=" " -# Root-Check +# ---- Root Check ---- if [[ $EUID -ne 0 ]]; then - echo -e "${INDENT}${BOLD}Bitte als Root ausführen!${RESET}" + echo -e "${BOLD}${RED}${INDENT}Bitte als Root ausführen!${RESET}" exit 1 fi -echo -e "${BOLD}${CYAN}" -echo -e "${INDENT}==============================================" -echo -e "${INDENT} Proxmox VE 9 – Repository Setup" -echo -e "${INDENT} No-Subscription | deb822 Standard" -echo -e "${INDENT}==============================================" -echo -e "${RESET}" +# ---- Header ---- +echo -e "${CYAN}${BOLD}${INDENT}==============================================${RESET}" +echo -e "${CYAN}${BOLD}${INDENT} Proxmox VE 9 – Repository Setup ${RESET}" +echo -e "${CYAN}${BOLD}${INDENT} No-Subscription | deb822 Standard ${RESET}" +echo -e "${CYAN}${BOLD}${INDENT}==============================================${RESET}" -# Proxmox Keyring prüfen +# ---- 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 + echo -e "${GREEN}${INDENT}✔ Keyring installiert${RESET}" +else + echo -e "${INDENT}✔ Keyring vorhanden" fi -# ----------------------------------------------------- -# PVE Repos -# ----------------------------------------------------- +# ---- PVE Repos einrichten ---- +echo -e "${INDENT}==> PVE Repositories einrichten..." # pve-enterprise.disabled cat < /etc/apt/sources.list.d/pve-enterprise.sources @@ -74,12 +77,11 @@ Signed-By: ${KEYRING} Enabled: true EOF -# ----------------------------------------------------- -# APT Update -# ----------------------------------------------------- -echo -e "${INDENT}==> APT Update..." +# ---- APT Update & Upgrade ---- +echo -e "${INDENT}==> APT Update & Upgrade..." apt update && apt dist-upgrade -y +# ---- Fertigmeldung ---- echo -echo -e "${GREEN}${INDENT}✔ Repositories erfolgreich eingerichtet!${RESET}" +echo -e "${GREEN}${BOLD}${INDENT}✔ Repositories erfolgreich eingerichtet!${RESET}" echo -e "${INDENT}PVE 9 + Ceph (squid) nutzen jetzt No-Subscription."