Update beta 1.2.2.2

This commit is contained in:
MacRimi
2026-06-10 19:53:40 +02:00
parent 7ad5508623
commit df95b50f8c
11 changed files with 1355 additions and 960 deletions

View File

@@ -343,7 +343,7 @@ _bk_local() {
# Fallback: gzip (rename archive)
archive="${archive%.zst}"
archive="${archive%.tar}.tar.gz"
if command -v pv >/dev/null 2>&1; then
if hb_ensure_pv; then
local stage_bytes
local pipefail_state
stage_bytes=$(du -sb "$staging_root" 2>/dev/null | awk '{print $1}')
@@ -1115,7 +1115,7 @@ _rs_export_to_file() {
tar_ok=0
: > "$log_file"
if command -v pv >/dev/null 2>&1; then
if hb_ensure_pv; then
# Stream tar through pv so the operator sees a live progress
# bar instead of staring at a frozen title for minutes. We
# mirror the same pattern used by the local backup path
@@ -1132,10 +1132,11 @@ _rs_export_to_file() {
fi
[[ "$pipefail_state" == "off" ]] && set +o pipefail
else
# pv isn't installedat least tell the operator something
# is happening and hint at the package they can install for
# a better experience next time.
msg_info "$(translate "Creating export archive (install 'pv' for a live progress bar)...")"
# Offline / apt unavailable — silently fall back to a plain
# tar so we still produce the archive. No "install pv" message:
# if we couldn't install it ourselves, sending the operator off
# to apt is just shifting our problem onto them.
msg_info "$(translate "Creating export archive...")"
stop_spinner
if tar -czf "$archive" -C "$staging_root" . >>"$log_file" 2>&1; then
tar_ok=1

View File

@@ -1889,6 +1889,18 @@ hb_require_cmd() {
command -v "$cmd" >/dev/null 2>&1
}
# Silent best-effort install of `pv` so callers can pipe tar through it
# for a live progress bar. Returns 0 if pv ends up available, 1 if not.
# Never speaks — pv is purely an UX improvement, asking the operator to
# install it themselves would be backwards (we have apt; they shouldn't).
hb_ensure_pv() {
command -v pv >/dev/null 2>&1 && return 0
if command -v apt-get >/dev/null 2>&1; then
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq pv >/dev/null 2>&1
fi
command -v pv >/dev/null 2>&1
}
# ==========================================================
# Compatibility check — compares backup metadata against the
# current host and surfaces hostname / PVE version / kernel /

View File

@@ -111,13 +111,6 @@ uninstall_proxmenux_monitor() {
}
detect_installation_type() {
# The Translation/Normal split is gone after the googletrans removal.
# All installs are multilingual via pre-built lang/*.json. Keeping the
# function name + a fixed value so callers don't have to change.
echo "normal"
}
check_monitor_status() {
if systemctl list-unit-files | grep -q "$MONITOR_SERVICE"; then
if systemctl is-active --quiet "$MONITOR_SERVICE"; then
@@ -528,9 +521,6 @@ show_monitor_status() {
# ==========================================================
show_config_menu() {
local install_type
install_type=$(detect_installation_type)
while true; do
local menu_options=()
local option_actions=()
@@ -561,35 +551,22 @@ show_config_menu() {
option_actions[$option_num]="change_release_channel"
((option_num++))
# Build menu based on installation type
if [ "$install_type" = "translation" ]; then
menu_options+=("$option_num" "$(translate "Change Language")")
option_actions[$option_num]="change_language"
((option_num++))
menu_options+=("$option_num" "$(translate "Show Version Information")")
option_actions[$option_num]="show_version_info"
((option_num++))
menu_options+=("$option_num" "$(translate "Uninstall ProxMenux")")
option_actions[$option_num]="uninstall_proxmenu"
((option_num++))
menu_options+=("$option_num" "$(translate "Return to Main Menu")")
option_actions[$option_num]="return_main"
else
# Normal version (English only)
menu_options+=("$option_num" "Show Version Information")
option_actions[$option_num]="show_version_info"
((option_num++))
menu_options+=("$option_num" "Uninstall ProxMenux")
option_actions[$option_num]="uninstall_proxmenu"
((option_num++))
menu_options+=("$option_num" "Return to Main Menu")
option_actions[$option_num]="return_main"
fi
# Translation/Normal split is gone — single menu now. Change Language
# is always available since every install ships the lang/*.json cache.
menu_options+=("$option_num" "$(translate "Change Language")")
option_actions[$option_num]="change_language"
((option_num++))
menu_options+=("$option_num" "$(translate "Show Version Information")")
option_actions[$option_num]="show_version_info"
((option_num++))
menu_options+=("$option_num" "$(translate "Uninstall ProxMenux")")
option_actions[$option_num]="uninstall_proxmenu"
((option_num++))
menu_options+=("$option_num" "$(translate "Return to Main Menu")")
option_actions[$option_num]="return_main"
# Show menu
OPTION=$(dialog --clear --backtitle "ProxMenux Configuration" \
@@ -665,8 +642,7 @@ change_language() {
# ==========================================================
show_version_info() {
local version info_message install_type release_channel beta_version
install_type=$(detect_installation_type)
local version info_message release_channel beta_version
release_channel=$(get_release_channel)
if [ -f "$LOCAL_VERSION_FILE" ]; then
@@ -683,15 +659,8 @@ show_version_info() {
fi
info_message+="\n"
# Show installation type
info_message+="$(translate "Installation type:")\n"
if [ "$install_type" = "translation" ]; then
info_message+="$(translate "Translation Version (Multi-language support)")\n"
else
info_message+="$(translate "Normal Version (English only - Lightweight)")\n"
fi
info_message+="\n"
# Translation/Normal split is gone — single install path now.
# Translation support is always present via the lang/*.json cache.
info_message+="$(translate "Installed components:")\n"
if [ -f "$CONFIG_FILE" ]; then
while IFS=': ' read -r component value; do
@@ -749,9 +718,6 @@ show_version_info() {
# ==========================================================
uninstall_proxmenu() {
local install_type
install_type=$(detect_installation_type)
if ! dialog --clear --backtitle "ProxMenux Configuration" \
--title "Uninstall ProxMenux" \
--yesno "\n$(translate "Are you sure you want to uninstall ProxMenux?")" 8 60; then