From c7c5fa582c68876b4be63652a4de520d2fe48659 Mon Sep 17 00:00:00 2001
From: Arnaud <80671351+Buco7854@users.noreply.github.com>
Date: Fri, 8 Aug 2025 00:04:00 +0200
Subject: [PATCH] fix: use same -s operator as previous script instead of -f
---
tools/pve/post-pve-install.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/pve/post-pve-install.sh b/tools/pve/post-pve-install.sh
index 1657b6ee..c783d2fc 100644
--- a/tools/pve/post-pve-install.sh
+++ b/tools/pve/post-pve-install.sh
@@ -516,7 +516,7 @@ post_routines_common() {
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"
encoded_script=$(base64 -w0 <<'EOF'
-[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /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; [ -f /usr/share/pve-yew-mobile-gui/index.html.tpl ] && sed -i '/' /usr/share/pve-yew-mobile-gui/index.html.tpl
+[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /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; [ -s /usr/share/pve-yew-mobile-gui/index.html.tpl ] && sed -i '/' /usr/share/pve-yew-mobile-gui/index.html.tpl
EOF
)
echo "DPkg::Post-Invoke { \"echo $encoded_script | base64 -d | bash\"; };" > /etc/apt/apt.conf.d/no-nag-script