fix(pve-post-install): check file exists before removing no-nag-script

Fixes script interruption when selecting 'no' to disable subscription nag
on a fresh system where no-nag-script doesn't exist.
This commit is contained in:
CanbiZ (MickLesk) committed 2026-01-29 15:56:51 +01:00
1 parent 24ddcb9d97
commit c464b95fa3
1 file changed
+1 -1
+1 -1
View File
@@ -595,7 +595,7 @@ EOF
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
msg_error "Selected no to Disabling subscription nag"
rm /etc/apt/apt.conf.d/no-nag-script 2>/dev/null
[[ -f /etc/apt/apt.conf.d/no-nag-script ]] && rm /etc/apt/apt.conf.d/no-nag-script
;;
esac
apt --reinstall install proxmox-widget-toolkit &>/dev/null || msg_error "Widget toolkit reinstall failed"