diff --git a/packaging/DEBIAN/postinst b/packaging/DEBIAN/postinst index 5eb3c16..1411ae1 100644 --- a/packaging/DEBIAN/postinst +++ b/packaging/DEBIAN/postinst @@ -1,11 +1,14 @@ #!/bin/bash # postinst: freenas-proxmox v3.x install/upgrade script -# Installs the TrueNAS custom storage plugin for Proxmox VE. -# No patches, no internet access required. +# Installs the TrueNAS custom storage plugin and UI panel for Proxmox VE. +# No patches to PVE core files — only adds our own files and one ' LOG_FILE="/var/log/freenas-proxmox-install.log" log() { @@ -15,21 +18,34 @@ log() { install_plugin() { log "Installing ${PLUGIN_DST}" mkdir -p "$(dirname "$PLUGIN_DST")" - cp "$PLUGIN_SRC" "$PLUGIN_DST" - log "Plugin installed" + cp "${INSTALL_DIR}/TrueNAS.pm" "$PLUGIN_DST" +} + +install_ui() { + log "Installing ${JS_DST}" + cp "${INSTALL_DIR}/truenas-storage.js" "$JS_DST" + + if grep -qF 'truenas-storage.js' "$TPL" 2>/dev/null; then + log "index.html.tpl already has truenas-storage.js — skipping" + return 0 + fi + + log "Adding