From 7c268219f41b5b7491fe2f2e80d2ed5af6b7bbb3 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sun, 12 Apr 2026 20:56:45 +0200 Subject: [PATCH] PMG Post Install: Detect gateway via /etc/os-release when /etc/issue is generic --- tools/pve/post-pmg-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/pve/post-pmg-install.sh b/tools/pve/post-pmg-install.sh index 532c4efaa..683e1475f 100644 --- a/tools/pve/post-pmg-install.sh +++ b/tools/pve/post-pmg-install.sh @@ -47,7 +47,9 @@ msg_error() { source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "post-pmg-install" "pve" -if ! grep -q "Proxmox Mail Gateway" /etc/issue 2>/dev/null; then +if ! grep -q "Proxmox Mail Gateway" /etc/issue 2>/dev/null && \ + ! grep -qE '^ID=(pmg|proxmox-mail-gateway)' /etc/os-release 2>/dev/null && \ + ! grep -qE '^PRETTY_NAME=.*Proxmox Mail Gateway' /etc/os-release 2>/dev/null; then msg_error "This script is only intended for Proxmox Mail Gateway" exit 232 fi