#!/bin/bash # PVE Trunks Plugin - Uninstaller set -euo pipefail PVE_JS_DIR="/usr/share/pve-manager/js" INDEX_TPL="/usr/share/pve-manager/index.html.tpl" PLUGIN_JS="pve-trunks-plugin.js" STORE_DIR="/usr/local/share/pve-trunks-plugin" REAPPLY="/usr/local/sbin/pve-trunks-reapply.sh" APT_HOOK="/etc/apt/apt.conf.d/99-pve-trunks-plugin" if [ "$(id -u)" -ne 0 ]; then echo "Error: run as root" >&2 exit 1 fi # Remove reapply machinery first, so it can't restore the plugin afterwards. rm -f "$APT_HOOK" "$REAPPLY" rm -rf "$STORE_DIR" # Remove the plugin JS. rm -f "$PVE_JS_DIR/$PLUGIN_JS" # Remove the