CHOICE=$(whiptail --title "PBS SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server.\n \nChange to Proxmox Backup Server sources?"14582\
"yes"" "\
"no"" " 3>&2 2>&1 1>&3)
case$CHOICE in
yes)
msg_info "Changing to Proxmox Backup Server Sources"
CHOICE=$(whiptail --title "PBS-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?"14582\
CHOICE=$(whiptail --title "PBS-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?"14582\
CHOICE=$(whiptail --title "PBS TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?"14582\
"yes"" "\
"no"" " 3>&2 2>&1 1>&3)
case$CHOICE in
yes)
msg_info "Adding 'pbstest' repository and set disabled"
CHOICE=$(whiptail --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?"14582\
"yes"" "\
"no"" " 3>&2 2>&1 1>&3)
case$CHOICE in
yes)
whiptail --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."1058
msg_info "Disabling subscription nag"
echo"DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
msg_ok "Disabled subscription nag (Delete browser cache)"
;;
no)
whiptail --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."1058
msg_error "Selected no to Disabling subscription nag"