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"
cat <<EOF >/etc/apt/sources.list
cat <<EOF >/etc/apt/sources.list
deb http://ftp.debian.org/debian bullseye main contrib
deb http://deb.debian.org/debian ${VERSION} main contrib
deb http://ftp.debian.org/debian bullseye-updates main contrib
deb http://deb.debian.org/debian ${VERSION}-updates main contrib
deb http://security.debian.org/debian-security bullseye-security main contrib
deb http://security.debian.org/debian-security ${VERSION}-security main contrib
EOF
EOF
sleep 2
msg_ok "Changed to Proxmox Backup Server Sources"
msg_ok "Added or Corrected PBS Sources"
;;
fi
no)
msg_error "Selected no to Correcting 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\
if[["${prompt,,}"=~ ^(y|yes)$ ]];then
"yes"" "\
msg_info "Enabling No-Subscription Repository"
"no"" " 3>&2 2>&1 1>&3)
cat <<EOF >>/etc/apt/sources.list
case$CHOICE in
deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription
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\
if[["${prompt,,}"=~ ^(y|yes)$ ]];then
"yes"" "\
msg_info "Adding Beta/Test Repository and set disabled"
"no"" " 3>&2 2>&1 1>&3)
cat <<EOF >>/etc/apt/sources.list
case$CHOICE in
# deb http://download.proxmox.com/debian/pbs bullseye pbstest
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\
if[["${prompt,,}"=~ ^(y|yes)$ ]];then
"yes"" "\
msg_info "Disabling Subscription Nag"
"no"" " 3>&2 2>&1 1>&3)
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
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"