Last active
April 12, 2025 08:43
-
-
Save egandro/7be54e8cbd6a991d7e7b441a27802927 to your computer and use it in GitHub Desktop.
NAG Screen removal (PVE 8.4.1+ / PBS 3.4.0+)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# proxmox uses (now) min and non min version for pve and pbs | |
PATTERN=nag_screen_removed | |
FILENAME=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js | |
if grep -q ${PATTERN} "${FILENAME}"; then | |
echo doing nothing: ${FILENAME} | |
else | |
cp ${FILENAME} ${FILENAME}.backup | |
sed -i.backup -z "s/res === null || res === undefined || \!res || res\n\t\t\t.data.status.toLowerCase() \!== 'active'/false/g" ${FILENAME} | |
# mark as fixed | |
echo "//${PATTERN}" >> ${FILENAME} | |
echo patched file: ${FILENAME} | |
fi | |
FILENAME=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.min.js | |
if grep -q ${PATTERN} "${FILENAME}"; then | |
echo doing nothing: ${FILENAME} | |
else | |
cp ${FILENAME} ${FILENAME}.backup | |
sed -i.backup -z "s/null=\!e||\!e.data||\"active\"\!==e.data.status.toLowerCase()/false/g" ${FILENAME} | |
# mark as fixed | |
echo "//${PATTERN}" >> ${FILENAME} | |
echo patched file: ${FILENAME} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment