Update post-pve-install.sh (#1175)

Restrict Delete Subscription Nag function to only match the line
with an opening brace, to prevent modifying lines unrelated to the
subscription nag.
pull/1176/head
Alex Leigh 2 years ago committed by GitHub
parent 0f607b725f
commit f85e920837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      misc/post-pve-install.sh

@ -109,7 +109,7 @@ fi
read -r -p "Disable Subscription Nag? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
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
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
apt --reinstall install proxmox-widget-toolkit &>/dev/null
msg_ok "Disabled Subscription Nag (Delete browser cache)"
fi

Loading…
Cancel
Save