适配pve8.0的非订阅用户弹窗进行删除

This commit is contained in:
spiritlhl 2023-06-24 14:56:03 +00:00
parent 74cb6c447a
commit 0d8233c1a0
2 changed files with 6 additions and 1 deletions

View file

@ -17,6 +17,7 @@
- 更新Debian12安装的PVE版本为stable
- 修复部分机器ifconfig命令不存在的问题
- 适配部分机器ipv6网络是SLAAC动态分配的情况
- 适配pve8.0的非订阅用户弹窗进行删除
[更新日志](CHANGELOG.md)

View file

@ -35,7 +35,11 @@ fi
# 移除订阅弹窗
pve_version=$(dpkg-query -f '${Version}' -W proxmox-ve 2>/dev/null | cut -d'-' -f1)
if [[ "$pve_version" == 7.* ]]; then
if [[ "$pve_version" == 8.* ]]; then
# pve8.x
cp -rf /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.bak
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
elif [[ "$pve_version" == 7.* ]]; then
# pve7.x
cp -rf /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.bak
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js