Skip to content

Instantly share code, notes, and snippets.

@arkan
Last active July 25, 2026 14:57
Show Gist options
  • Select an option

  • Save arkan/b743b48c58d250c224950608b771af76 to your computer and use it in GitHub Desktop.

Select an option

Save arkan/b743b48c58d250c224950608b771af76 to your computer and use it in GitHub Desktop.
#! /bin/bash
echo Backing up the original file just in case ...
cp /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js "/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.backup-$(date +'%d-%m-%Y-%H-%M-%S')"
echo Patching ...
sed -i.bak "s/.data.status.toLowerCase() !== 'active'/.data.status.toLowerCase() === 'active'/" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
# Restart PVE Web
if [[ $(systemctl is-active pveproxy.service) = 'active' ]]
then
systemctl restart pveproxy.service
fi
echo Restarting ...
if [[ $(systemctl is-active proxmox-backup-proxy.service) = 'active' ]]
then
systemctl restart proxmox-backup-proxy.service
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment