alternate fix for #6087 (#6098)

This commit is contained in:
Luke Hamburg 2025-07-21 12:47:03 -04:00 committed by GitHub
parent 901837b4ae
commit 85595871df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,24 +133,23 @@ EOF
;; ;;
esac esac
if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ "yes" " " \
"yes" " " \ "no" " " 3>&2 2>&1 1>&3)
"no" " " 3>&2 2>&1 1>&3) case $CHOICE in
case $CHOICE in yes)
yes) whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag"
msg_info "Disabling subscription nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit 2>/dev/null && [ -f /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\"; };" >/etc/apt/apt.conf.d/no-nag-script
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit 2>/dev/null && [ -f /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\"; };" >/etc/apt/apt.conf.d/no-nag-script msg_ok "Disabled subscription nag (Delete browser cache)"
apt --reinstall install proxmox-widget-toolkit &>/dev/null ;;
msg_ok "Disabled subscription nag (Delete browser cache)" no)
;; whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
no) msg_error "Selected no to Disabling subscription nag"
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 rm /etc/apt/apt.conf.d/no-nag-script 2>/dev/null
msg_error "Selected no to Disabling subscription nag" ;;
;; esac
esac apt --reinstall install proxmox-widget-toolkit &>/dev/null
fi
if ! systemctl is-active --quiet pve-ha-lrm; then if ! systemctl is-active --quiet pve-ha-lrm; then
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \ CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \