Files
fileserver/files/bashscripts/proxmox/remove-nag.sh
2023-08-11 11:47:26 -05:00

20 lines
857 B
Bash
Executable File

PVE=/usr/share/pve-manager/js/pvemanagerlib.js
LIB=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
PBS=/usr/share/javascript/proxmox-backup/js/proxmox-backup-gui.js
if [ -f $PVE ]; then
# hide pve gui help/documentation button
sed -i.bak "s/hidden: false/hidden: true/g" $PVE
# fix proxmox widget toolkit lib
sed -i.bak -z "s/res === null || res === undefined || \!res || res\n\t\t\t.data.status.toLowerCase() \!== 'active'/false/g" $LIB
systemctl restart pveproxy
fi
if [ -f $PBS ]; then
# fix proxmox widget toolkit lib
sed -i.bak -z "s/res === null || res === undefined || \!res || res\n\t\t\t.data.status.toLowerCase() \!== 'active'/false/g" $LIB
# fix pbs gui
sed -i.bak "s/let subStatus = status.toLowerCase() === 'active' ? 2 : 0/let subStatus = status.toLowerCase() === 'active' ? 2 : 2/" $PBS
systemctl restart proxmox-backup-proxy
fi