Files
MacRimi 08ae134860 Keep guest services off PBS hosts, refuse only known PBS in PVE scripts and follow the menu conventions
- On a PBS host the Monitor no longer starts the node metrics and VM prewarmers, the LXC update scheduler, the managed installs detector or the app update emitter, which read guests and PVE metrics that do not exist there
- pmx_require_pve refuses only a host known to be PBS, so an unreadable package list leaves the PVE scripts working as before
- The PBS menu numbers its options, shows the tables proxmox-backup-manager prints instead of raw JSON, and says Goodbye on exit
- The PBS update asks to press Enter before returning
- Spanish: Datastores de PBS
2026-10-17 10:01:37 +02:00

42 lines
2.0 KiB
Bash

#!/bin/bash
# Use PBS's existing repositories; never run PVE repo, Ceph or major-upgrade scripts.
BASE_DIR="/usr/local/share/proxmenux"
LOCAL_SCRIPTS="$BASE_DIR/scripts"
source "$BASE_DIR/utils.sh"
source "$LOCAL_SCRIPTS/global/platform-functions.sh"
load_language
initialize_cache
if ! pmx_is_pbs || [[ "$(pmx_platform_field supported)" != true ]]; then
msg_error "$(translate 'This operation supports PBS 3 on Debian 12 and PBS 4 on Debian 13.')"
exit 1
fi
[[ $EUID -eq 0 ]] || { msg_error "$(translate 'Run this operation as root.')"; exit 1; }
dialog --backtitle "ProxMenux" --title "$(translate 'PBS package update')" \
--yesno "$(translate 'Refresh the configured APT repositories and review the PBS package upgrade? Repository files will be preserved.')" 10 80 || exit 0
if ! apt-get -o APT::Update::Error-Mode=any update; then
msg_error "$(translate 'APT refresh failed. Check the PBS subscription and repositories in the native PBS interface; no source was changed.')"
msg_success "$(translate "Press Enter to continue...")"
read -r
exit 1
fi
plan=$(mktemp)
trap 'rm -f "$plan"' EXIT
if ! apt-get -s full-upgrade > "$plan" 2>&1; then
dialog --backtitle "ProxMenux" --title "$(translate 'Review package upgrade')" --textbox "$plan" 24 100
exit 1
fi
dialog --backtitle "ProxMenux" --title "$(translate 'Review package upgrade')" --textbox "$plan" 24 100
dialog --backtitle "ProxMenux" --defaultno --title "$(translate 'Apply PBS package upgrade')" \
--yesno "$(translate 'Apply the reviewed package upgrade now? Services may restart and packages listed for removal will be removed.')" 11 80 || exit 0
if apt-get -y full-upgrade; then
msg_ok "$(translate 'PBS package upgrade completed. Check whether a reboot is required before your next backup window.')"
else
msg_error "$(translate 'PBS package upgrade failed. Review the APT output before retrying.')"
msg_success "$(translate "Press Enter to continue...")"
read -r
exit 1
fi
msg_success "$(translate "Press Enter to continue...")"
read -r